Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  


Creates a new player.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WMFP 10.0 No Yes Yes, Windows only No No
MBS( "WMFP.Create"; URL { ; WindowRef; ControlName } )   More


Parameter Description Example Flags
URL The URL for the video.
See Path.FilePathToFileURL function to convert file path.
WindowRef Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex functions. Pass zero to access the frontmost window. 0 Optional
ControlName The name of the control on your FileMaker form.
e.g. you can place a rectangle there to define the position.
"mymedia" Optional


Returns reference number or error.


Creates a new player.
The player can be audio only without showing in the layout or reference a layout object to play with video.
The file is loaded asynchronously, so please wait a few milliseconds or check state later.

Use WMFP.Release later to destroy the video player.

Pass no window reference and no control name to create an audio player for background playback.


Load video into new player:

# Create new player and load video
Set Variable [ $URL ; Value: MBS( "Path.FilePathToFileURL"; Windows Player::Path) ]
# Player is a rectangle on the layout
Set Variable [ $$player ; Value: MBS("WMFP.Create"; $URL; 0; "Player") ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "Failed to load video" ; $$player ]
    Set Variable [ $$player ; Value: "" ]
    # Little pause to let loading happen in background
    Pause/Resume Script [ Duration (seconds): ,1 ]
    Set Variable [ $r ; Value: MBS("WMFP.SetPlaybackEndedScriptTrigger"; $$player; Get(FileName); "Playback Done") ]
    Set Variable [ $r ; Value: MBS("WMFP.Play"; $$player) ]
End If

See also

Example Databases

Blog Entries

Created 25th December 2019, last changed 9th June 2020

WIA.SetItemPropertyValue   -   WMFP.FrameStep

Feedback: Report problem or ask question.

MBS Xojo blog