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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Creates a new player.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WMFP | 10.0 | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |
Parameter | Description | Example | Flags |
---|---|---|---|
URL | The URL for the video. See Path.FilePathToFileURL function to convert file path. |
"file://C:/Users/Christian/Desktop/test.MOV" | |
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.
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: "" ]
Else
# 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
This function checks for a license.
Created 25th December 2019, last changed 18th June 2022