Reference > Script steps reference > Miscellaneous script steps > AVPlayer Play
 

AVPlayer Play

Plays audio, video, or images from a container field, layout object, or URL.

See also 

Options 

Source specifies the source for the media:

Layout Object specifies the layout object to play the media from.

Field specifies the container field to play the media from. The field doesn’t need to be present on the layout.

URL specifies the URL to play the media from. You can type the URL or create a URL from a calculation.

If no source is specified, the script step will use the active layout object, when possible.

Presentation specifies how to display the media. If the source for the media is a field or a URL, the only options for Presentation are Full Screen Only and Audio Only.

Start Full Screen starts playing the media in full screen but allows changing the presentation to embedded.

Full Screen Only plays the media in full screen.

Start Embedded starts playing the media as embedded but allows changing the presentation to full screen.

Embedded Only plays the media as embedded. It doesn’t allow users to change the presentation to full screen.

Audio Only plays only the audio.

Disable Interaction enables or disables user interaction with the playback. If this option is set to Yes, you cannot use the playback controls or gestures to interact with the media.

Yes disables user interaction with the playback.

No enables user interaction with the playback.

Hide Controls shows or hides the playback controls while the media plays. If you hide the playback controls but enable interaction, you can use gestures instead of playback controls.

Yes hides the playback controls.

No shows the playback controls.

Position specifies how many seconds from the beginning of the media to start playback.

Start Offset specifies the beginning of the playback range in seconds from the beginning of the media. The media can be played only within the playback range. For example, if you set this option to 30, the user cannot rewind into or play the first 30 seconds of the media. The default value for this option is 0, which allows the media to start from the beginning.

End Offset specifies the end of the playback range in seconds from the beginning of the media. The media can be played only within the playback range. For example, if you set this option to 100, the user cannot fast forward or play past the first 100 seconds of the media. The default value for this option is 0, which allows the media to play to the end.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

No 

FileMaker Go 

Yes 

FileMaker WebDirect 

No 

FileMaker Server 

No 

FileMaker Cloud 

No 

FileMaker Data API 

No 

Custom Web Publishing 

No 

Runtime solution 

No 

Originated in 

FileMaker Pro 14.0

Description 

Use this script to play media files from container fields, layout objects, or URLs in FileMaker Go. The media can be an audio, a video, or an image file.

If the foreground window contains a media file that is playing when the window moves to the back, the media file continues to play.

Example 1 

Plays a media file in full screen and hides playback controls after the OnRecordLoad script trigger is activated:

AVPlayer Play [Field: Library::Video; Presentation: Full Screen Only; Hide Controls: Yes]

Example 2 

Resumes playing a media file from the position at which it was last stopped.

Set Field [Library::Last Stopped Position; GetAVPlayerAttribute ("position")]
AVPlayer Play [Field: Library::Video; Position: Library::Last Stopped Position]

Example 3 

Plays the media file in full screen for iPhone, and embedded for iPad.

If [Get(Device) = 3 //iPad]
AVPlayer Play [Object Name: "Container"; Presentation: Start Embedded]
Else If [Get(Device) = 4 //iPhone]
AVPlayer Play [Object Name: "Container"; Presentation: Start Full Screen]
End If

Related topics 

Script steps reference (alphabetical list)

Script steps reference (category list)

AVPlayer Set Options script step

AVPlayer Set Playback State script step

GetAVPlayerAttribute function