Returns the setting of the specified attribute for the audio, video, or image file in a container field.
GetAVPlayerAttribute(attributeName)
attributeName
- the name of a supported attribute (see below).
text, number
FileMaker Pro 14.0
This function is used in FileMaker Go. If this function is called when the media file is playing or is paused, it returns a value for the file’s current playback state. If the function is called when no media is playing, it returns a value for the state of the media file most recently played. If the function is called when no media file has been played, it returns an empty string or 0.
Attribute | Returns | Data type returned |
| All the attributes and their values. | text |
| The source type used for audio and video files: | number |
| The URL, field name, or layout object name. If | text |
| A number representing the state of the media playback: | number |
| The method used to display the media: | number |
| The position (in seconds) currently playing in the media. | number |
| The starting position of the playback (in seconds). | number |
| The end position of the playback (in seconds); returns 0 if playing to the end of the media. | number |
| The length of time (in seconds) that the audio or video file will play. | number |
| Indicates why the last OnObjectAVPlayerChange or OnFileAVPlayerChange script triggers were activated: | number |
| Provides information about the event that activated the last OnObjectAVPlayerChange or OnFileAVPlayerChange script trigger: | number |
| Indicates which media file should be played next: | number |
| 0 if playback ends successfully; returns 1 if playback ends due to an error. | number |
| 1 (Yes) if the playback controls are hidden; otherwise returns 0 (No). | number |
| 1 (Yes) if users cannot interact with the playback; otherwise returns 0 (No). | number |
| 1 (Yes) if the iOS playback controls on the lock screen or on the control panel are disabled when the media is playing or is paused; otherwise, returns 0 (No). | number |
| 0 Video is paused (except for Picture in Picture) and audio continues to play when FileMaker Go moves to the background. | number |
| Indicates how the video is displayed: | number |
| Indicates the volume level for the audio. | number |
| Specifies whether the video is displayed as Picture in Picture: | number |
| Specifies whether a video is played on an external device, such as Apple TV via AirPlay: | number |
| The source type used for images: | number |
| The URL, field name, or layout object name for images. | text |
| The length of time (in seconds) that the images should be displayed. | number |
Stops playing a media file if it is currently playing.
If [GetAVPlayerAttribute("playbackState") = 1]
AVPlayer Set Playback State [Stopped]
End If
Checks the duration of a media file and displays a message if it is longer than 30 minutes.
If [GetAVPlayerAttribute("duration") > 1800]
Show Custom Dialog ["Exceeds Maximum Duration"; "The current video is longer than 30 minutes."]
Else
AVPlayer Play [Field: Library::Video]
End If