Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5    Statistic  

AVAsset.WaitForLoaded

Waits for file to be loaded.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
AVAsset 8.0 Yes No Yes, macOS only No Yes
MBS( "AVAsset.WaitForLoaded"; Asset )   More

Parameters

Parameter Description Example value
Asset The reference number of the asset. Please use AVAsset.OpenContainer, AVAsset.OpenFile or AVAsset.OpenURL function to get asset reference. $asset

Result

Returns status or error.

Description

Waits for file to be loaded.
Returns status like Loading, Loaded, Cancelled, Failed or Unknown.
If status starts with "Failed: ", it is followed by a reason.

While AVAsset.Loaded returns directly and may return "Loading", this function can be called after AVAsset.OpenFile, AVAsset.OpenURL or AVAsset.OpenContainer to have the script wait for assets to load.

Examples

Load asset:

Set Variable [ $path ; Value: "/Users/cs/Movies/video.mov" ]
Set Variable [ $asset ; Value: MBS("AVAsset.OpenFile"; $path) ]
# now wait a few milliseconds to load
Set Variable [ $r1 ; Value: MBS( "AVAsset.WaitForLoaded"; $asset ) ]
# check status
Set Variable [ $r2 ; Value: MBS( "AVAsset.Loaded"; $asset ) ]
Show Custom Dialog [ "Loaded" ; $r1 & ¶ & $r2 ]
Set Variable [ $r3 ; Value: MBS( "AVAsset.Release"; $asset ) ]

See also

Example Databases

Created 9th January 2018, last changed 9th January 2018


AVAsset.URL   -   AVExport.AllExportPresets

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins