Skip to main contentIBM Video Streaming Developers

Using MediaPlayer Plugins

IBM Video Streaming Player SDK version 1.1.0 introduced a plugin system which enables you to extend the media player with additional features. Plugins will be provided by IBM and must be provided during player initialization in Player.initWithContent(ContentDescriptor, MediaPlayerModule). These extensions may require different player views than com.ibm.video.android.player.android.PlayerView. PlayerView requirements for a plugin will always be stated in this documentation but can also be queried from the MediaPlayerModule instance itself using MediaPlayerModule.getSupportedPlayerViewType(). Make sure to always use the appropriate PlayerView.

Creation of the plugin is the user’s responsibility, use the constructor of the desired plugin, provide appropriate parameters and set listeners. When a plugin is passed to a Player instance it will be retained across configuration changes, however the listeners the user provided are not subject to the usual Player.attach() / Player.detach() working. The user needs to manually set and remove those listeners. The current MediaPlayerModule in use can be retrieved from the player instance using Player.getMediaPlayerPlugin() which returns a MediaPlayerModule that will be cast to the appropriate class that was set during initWithContent. The user must know which MediaPlayerModule was set during init.

Please note that while a MediaPlayerPlugin provided through Player.initWithContent is retained across configuration changes, the plugin itself might NOT support configuration changes at all due to plugin specific reasons. This will always be stated in the plugin’s documentation under the Plugin limitations section.

Ads Plugin

IMPORTANT NOTICE

Ads plugin has been sunset and removed from the SDK. Support is no longer provided for this component.