Skip to main content

First version of Blaise 5 ACASI in the upcoming 5.3.0 release

Blaise 5.3.0 offers a first version of ACASI. This means that it is possible to play audio files in the data entry program(s). Methodologically speaking, it is better if the question is asked in exactly the same way every time. Playing an audio recording makes this possible.

Functionality was added to make this possible. As a result, this functionality is now available for all media types: Audio, Video, Images.

In the resource database editor, it is now possible to store media files outside of the resource database. To accomplish this, all media elements now have a Url property, which can be used instead of the FileName property. When a Url is specified, the media element is not stored in the resource database, but will be loaded at runtime from the specified Url. Specifying a Url will clear the FileName property and vice versa.

blaise 5.3.0 acasi 1

blaise 5.3.0 acasi 2

The ImageControl element, that can be used in the Resource Database Editor, now has two properties that have to do with the source of the image:

  • Source: the source of the image is a resource element that is defined in the Resource Database (like Remark in the example above). The actual location of the image is determined by the FileName/Url properties of the Remark resource element.
  • SourceUrl: the source of the image is a Url. This property takes precedence over Source!

blaise 5.3.0 acasi 3

As you can see, there are two ways of specifying a Url for an image control: give a resource element a Url or give the image control a Url. The reason for this is, to enable Brushes to also have a Url source (you can select an image brush as background for several controls)

An image control also has an URI property. This property determines the location that is used when a user clicks on the image (it is a shortcut for the OnClick event handler of the image control). The URI property has nothing to do with the source of the image itself!

The Audio Control also has the Source and SourceUrl properties, and they work exactly the same as the properties for the image control. The Audio Control used to have a URI property, but this property is now obsolete, because it did exactly the same as the SourceUrl property.

Eight new actions have been introduced: PlayAudio, PauseAudio, PlayPauseAudio, StopAudio, PlayVideo, PauseVideo, PlayPauseVideo and StopVideo. These actions are client-side actions. No server contact is needed to perform the action.

The actions take an audio control or a video control as input parameter:

blaise 5.3.0 acasi 4

The actions are interpreted as follows:

Action \ Playback State

Stopped

Paused

Playing

PlayAudio

Play

Resume

Do Nothing

PauseAudio

Pause

Do Nothing

Pause

PlayPauseAudio

Play

Resume

Pause

StopAudio

Do Nothing

Stop

Stop

PlayVideo

Play

Resume

Do Nothing

PauseVideo

Pause

Do Nothing

Pause

PlayPauseVideo

Play

Resume

Pause

StopVideo

Do Nothing

Stop

Stop

To make these actions even more useful, we have added two events to a fieldpane template: OnEnter and OnLeave:

blaise 5.3.0 acasi 5

These events are triggered when the active field changes. A typical use of this feature would be to add a PlayAudio event to the OnEnter event, and a StopAudio event to the OnLeave event.

Gaining deeper understanding