Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to MFPMediaPlayerMBS class.
MFPMediaPlayerMBS.ClearMediaItem
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This method stops playback and releases the player object's references to the current media item.
This method completes asynchronously. When the operation completes, the MediaItemCleared event is invoked. The event type is
MFPMediaPlayerMBS.Constructor(URL as String = "", StartPlayback as Boolean = false)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.Constructor(URL as String, StartPlayback as Boolean, control as DesktopControl)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 22.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Control: A reference to a control where the video will appear. For audio-only playback, this parameter can be nil.
The control specified is used for the first selected video stream in the source.
If control is nil, MFPlay will not display any video.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.Constructor(URL as String, StartPlayback as Boolean, control as RectControl)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Control: A reference to a control where the video will appear. For audio-only playback, this parameter can be nil.
The control specified is used for the first selected video stream in the source.
If control is nil, MFPlay will not display any video.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.Constructor(URL as String, StartPlayback as Boolean, Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Handle: A handle to a window or control where the video will appear. For audio-only playback, this parameter can be nil.
The window specified is used for the first selected video stream in the source.
If windows is nil, MFPlay will not display any video.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.Constructor(URL as String, StartPlayback as Boolean, win as DesktopWindow)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 22.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Win: A reference to a window where the video will appear. For audio-only playback, this parameter can be nil.
The window specified is used for the first selected video stream in the source.
If windows is nil, MFPlay will not display any video.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.Constructor(URL as String, StartPlayback as Boolean, win as Window)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
URL: The string that contains the URL of a media file to open. This parameter can be empty. If the parameter is empty, StartPlayback must be false.
If this parameter is empty, you can open a URL later by calling CreateMediaItemFromURL.
StartPlayback: If true, playback starts automatically. If false, playback does not start until the application calls Play method. If URL is empty, this parameter is ignored.
Win: A reference to a window where the video will appear. For audio-only playback, this parameter can be nil.
The window specified is used for the first selected video stream in the source.
If windows is nil, MFPlay will not display any video.
Please call this in main thread of application only.
See also:
MFPMediaPlayerMBS.CreateMediaItemFromURL(URL as String, Sync as Boolean = true, tag as Variant = nil) as MFPMediaItemMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
URL: String that contains the URL of a media file.
Sync: If true, the method blocks until it completes. If false, the method does not block and completes asynchronously.
If fSync is true, we return the item on success.
This method does not queue the media item for playback. To queue the item for playback, set MediaItem property.
The CreateMediaItemFromURL method can be called either synchronously or asynchronously:
If Sync is true, the method completes synchronously and returns the new item.
If Sync is false, the method completes asynchronously. When the operation completes, the MediaItemCreated event is invoked. The event call passes the new media item.
If you make multiple asynchronous calls to CreateMediaItemFromURL, they are not guaranteed to complete in the same order. Use the tag to pass data to the event.
Currently, this method raises an error if the URL specifies any of the following protocols: rtsp*, mms*, or mcast.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This method completes asynchronously. When the operation completes, the FrameStepped event is raised.
The player object does not support frame stepping during reverse playback (that is, while the playback rate is negative).
MFPMediaPlayerMBS.GetVideoSourceRect(byref Left as Single, byref Top as Single, byref Right as Single, byref Bottom as Single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This rectangle defines which portion of the video is displayed. It is specified in normalized coordinates, which are defined as follows:
The upper-left corner of the video image is (0, 0).
The lower-right corner of the video image is (1, 1).
If the source rectangle is {0, 0, 1, 1}, the entire image is displayed. This is the default value.
MFPMediaPlayerMBS.InsertEffect(CLSID as String, isOptional as boolean = false) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Please pass class id of a Media Foundation transform (MFT) that implements the effect. MFTs expose the IMFTransform interface.
isOptional specifies whether the effect is optional.
Value | Meaning |
True | The effect is optional. If the MFPlay player object cannot add the effect, it ignores the effect and continues playback. |
False | If the MFPlay player object cannot add the effect, a playback error occurs. |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
While playback is paused, the most recent video frame is displayed, and audio is silent.
This method completes asynchronously. When the operation completes, the application's Paused event is invoked.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This method completes asynchronously. When the operation completes, the Started event is raised.
MFPMediaPlayerMBS.RemoveAllEffects
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The change applies to the next media item that is set on the player. The effects are not removed from the current media item.
MFPMediaPlayerMBS.RemoveEffect(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Please pass the number returned by InsertEffect.
The change applies to the next media item that is set on the player. The effect is not removed from the current media item.
MFPMediaPlayerMBS.SetVideoSourceRect(Left as Single, Top as Single, Right as Single, Bottom as Single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
MFPlay clips the video to this rectangle and stretches the rectangle to fill the video window.
This rectangle defines which portion of the video is displayed. It is specified in normalized coordinates, which are defined as follows:
The upper-left corner of the video image is (0, 0).
The lower-right corner of the video image is (1, 1).
To display the entire image, set the source rectangle to {0, 0, 1, 1}. This is the default value.
MFPlay stretches the source rectangle to fill the entire video window. By default, MFPlay maintains the source's correct aspect ratio, letterboxing if needed. The letterbox color is controlled by the BorderColor property.
This method fails if no media item is currently set, or if the current media item does not contain video.
To set the video position before playback starts, call this method inside your MediaItemSet event.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
After this method is called, most IMFPMediaPlayer methods raise exception about shutdown. Also, any media items created from this instance of the player object are invalidated and most IMFPMediaItem methods also raise exceptions.
The player object automatically shuts itself down when its reference count reaches zero. You can use the Shutdown method to shut down the player before all of the references have been released.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This method completes asynchronously. When the operation completes, the Stopped event is raised.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
This method makes sure the video is updated now, not later.
The items on this page are in the following plugins: MBS WinFrameworks Plugin.