Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVPlayerMBS class.

AVPlayerMBS.available as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether this class is available.

Returns true on Mac OS X 10.7 and newer.

AVPlayerMBS.playerWithFile(File as folderitem) as AVPlayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new player to play a single audiovisual resource referenced by a given file.

File: A folderitem that identifies an audiovisual resource.
Returns a new player initialized to play the audiovisual resource specified by folderitem.
This method implicitly creates an AVPlayerItem object. You can get the player item using currentItem.

AVPlayerMBS.playerWithPlayerItem(item as AVPlayerItemMBS) as AVPlayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new player initialized to play a given single audiovisual item

item: A player item.
Returns a new player, initialized to play item.

You can use this method to play items for which an AVAsset object has previously been created (see Constructor in AVPlayerItem).

AVPlayerMBS.playerWithURL(URL as string) as AVPlayerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a new player to play a single audiovisual resource referenced by a given URL.

URL: An URL that identifies an audiovisual resource.
Returns a new player initialized to play the audiovisual resource specified by URL.
This method implicitly creates an AVPlayerItem object. You can get the player item using currentItem.

AVPlayerMBS.removeTimeObserver(observer as AVPlayerTimeObserverMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Cancels a previously registered time observer.

observer: An object returned by a previous call to addPeriodicTimeObserverForInterval or addBoundaryTimeObserverForTimes.

Upon return, the caller is guaranteed that no new time observer event will begin executing. Depending on the calling thread and the queue used to add the time observer, an in-flight block may continue to execute after this method returns. You can guarantee synchronous time observer removal by enqueuing the call to removeTimeObserver on the main queue (do it in main event).

You should use this method to explicitly cancel each time observer added using addPeriodicTimeObserverForInterval and addBoundaryTimeObserverForTimes.

Some examples using this method:

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...