Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

AVAsset.OpenFile

Opens an asset from a file.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
AVAsset 5.2 Yes No Yes, macOS only No Yes

MBS( "AVAsset.OpenFile"; Path )

Parameters

Parameter Description Example value
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


AVAsset.OpenContainer   -   AVAsset.OpenURL

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos