Platforms to show: All Mac Windows Linux Cross-Platform
MFPMediaPlayerMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Windows Media Foundation | MBS WinFrameworks Plugin | 20.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
An alternative movie and audio player for Xojo.
For Windows 7, Windows Server 2008 R2 or newer.
- 11 events
- event Ended
- event Error
- event FrameStepped
- event MediaItemCleared
- event MediaItemCreated(MediaItem as MFPMediaItemMBS, Tag as variant)
- event MediaItemSet
- event Paused
- event PositionSet
- event RateSet(rate as Single)
- event Started
- event Stopped
- 25 properties
- property AspectRatioMode as Integer
- property Balance as Single
- property BorderColor as Color
- property Duration as Double
- property FastestSupportedRateForward as Single
- property FastestSupportedRateReverse as Single
- property Handle as Integer
- property IdealVideoMaxHeight as Integer
- property IdealVideoMaxWidth as Integer
- property IdealVideoMinHeight as Integer
- property IdealVideoMinWidth as Integer
- property Looping as Boolean
- property MediaItem as MFPMediaItemMBS
- property Mute as Boolean
- property NativeVideoAspectRateHeight as Integer
- property NativeVideoAspectRateWidth as Integer
- property NativeVideoHeight as Integer
- property NativeVideoWidth as Integer
- property Position as Double
- property Rate as Single
- property SlowestSupportedRateForward as Single
- property SlowestSupportedRateReverse as Single
- property State as Integer
- property VideoWindow as Integer
- property Volume as Single
- 19 methods
- method ClearMediaItem
- method Constructor(URL as String = "", StartPlayback as Boolean = false)
- method Constructor(URL as String, StartPlayback as Boolean, control as DesktopControl)
- method Constructor(URL as String, StartPlayback as Boolean, control as RectControl)
- method Constructor(URL as String, StartPlayback as Boolean, Handle as Integer)
- method Constructor(URL as String, StartPlayback as Boolean, win as DesktopWindow)
- method Constructor(URL as String, StartPlayback as Boolean, win as Window)
- method CreateMediaItemFromURL(URL as String, Sync as Boolean = true, tag as Variant = nil) as MFPMediaItemMBS
- method FrameStep
- method GetVideoSourceRect(byref Left as Single, byref Top as Single, byref Right as Single, byref Bottom as Single)
- method InsertEffect(CLSID as String, isOptional as boolean = false) as Integer
- method Pause
- method Play
- method RemoveAllEffects
- method RemoveEffect(Handle as Integer)
- method SetVideoSourceRect(Left as Single, Top as Single, Right as Single, Bottom as Single)
- method Shutdown
- method Stop
- method UpdateVideo
- 10 constants
States
Constant | Value | Description |
---|---|---|
StateEmpty | 0 |
Initial state. No media items have been set on the player object. |
StatePaused | 3 |
Playback is paused. |
StatePlaying | 2 |
Playback is in progress. |
StateShutdown | 4 |
The player object was shut down. This state is returned after the application calls Shutdown method. |
StateStopped | 1 |
Playback is stopped. |
Aspect Ratio Modes
Constant | Value | Description |
---|---|---|
VideoARModeMask | 7 |
Bitmask to validate flag values. This value is not a valid flag. |
VideoARModeNone | 0 |
Do not maintain the aspect ratio of the video. Stretch the video to fit the output rectangle. |
VideoARModeNonLinearStretch | 4 | Apply a non-linear horizontal stretch if the aspect ratio of the destination rectangle does not match the aspect ratio of the source rectangle. more |
VideoARModePreservePicture | 1 |
Preserve the aspect ratio of the video by letterboxing or within the output rectangle. |
VideoARModePreservePixel | 2 | Correct the aspect ratio if the physical size of the display device does not match the display resolution. For example, if the native resolution of the monitor is 1600 by 1200 (4:3) but the display resolution is 1280 by 1024 (5:4), the monitor will display non-square pixels. more |
This class has no sub classes.
Blog Entries
- News from the MBS Xojo Plugins Version 20.1
- MBS Xojo Plugins, version 20.1pr5
- New in the MBS Xojo Plugins 20.0
- MonkeyBread Software Releases the MBS Xojo Plugins in version 20.0
- MBS Xojo Plugins, version 19.6pr4
Xojo Developer Magazine
Videos
Release notes
- Version 20.1
- Added Looping property to MFPMediaPlayerMBS class.
- Version 20.0
- Added MFPMediaPlayerMBS, MFPMediaPlayerExceptionMBS and MFPMediaItemMBS classes for Windows video/audio playback.
Some examples using this class:
Some related classes:
The items on this page are in the following plugins: MBS WinFrameworks Plugin.
MFPMediaPlayerExceptionMBS - MidiClientMBS
