Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

AVPlayer.OpenFile

Opens an audio file.

Component Version macOS Windows Linux Server iOS SDK
AVPlayer 7.1 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "AVPlayer.OpenFile"; Path )   More

Parameters

Parameter Description Example
Path The native file path to the movie file. "/Test.mov"

Result

Returns player reference number or error.

Description

Opens an audio file.
Returns the reference number which must be released with AVPlayer.Release function.

See WMFP.Create for Windows.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.

Examples

Open file:

Set Variable [$player; Value:MBS("AVPlayer.OpenFile"; AVPlayer::FilePath)]
If [MBS("IsError")]
    Show Custom Dialog ["Error loading audio file."; $player]
    Exit Script []
End If
Set Field [AVPlayer::Duration; MBS("AVPlayer.GetDuration"; $player)]
Set Field [AVPlayer::Rate; MBS("AVPlayer.GetRate"; $$Player)]
Set Field [AVPlayer::Volume; MBS("AVPlayer.GetVolume"; $$Player)]
Set Variable [$$player; Value:$player]

See also

Example Databases

This function checks for a license.

Created 3th February 2017, last changed 18th June 2022


AVPlayer.OpenContainer - AVPlayer.OpenURL