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: 10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3    Statistic    FMM    Blog  

AVAsset.OpenFile

Opens an asset from a file.

Component Version macOS Windows Linux Server iOS SDK
AVAsset 5.2 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "AVAsset.OpenFile"; Path )   More

Parameters

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

Result

Returns asset reference number or error.

Description

Opens an asset from a file.
Please allow a second to load video in background asynchronously.
Available in OS X v10.7 and later.

Please call AVAsset.Release later to free object from memory.

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.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Opens a movie file:

MBS( "AVAsset.OpenFile"; "/Users/cs/Desktop/test.mp4" )

Close it later

MBS( "AVAsset.Release"; $asset )

See also

Example Databases

Created 19th June 2015, last changed 30th May 2017


AVAsset.OpenContainer - AVAsset.OpenURL

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins

Start Chat