Migrate from legacy to v2.0

This page provides information about migrating to   v2.0 of the Wowza Flowplayer Android SDK from legacy versions. You can find details about new features, core-library updates, and breaking changes. Additionally, we explain what classes, interfaces, and methods were modified in this release.

For questions or suggestions about these changes, you can submit a support ticket to support@flowplayer.com.

Project goals and improvements

We took on this project and rewrote the foundation of our Android SDK using Kotlin to provide architectural and performance improvements. In the process, we removed dependencies on outdated frameworks, such as RxJava, which tended to unnecessarily bloat our customers' applications. We also upgraded the project to use Media3 ExoPlayer, taking advantage of its rich feature set, including media notification support that allows our player to interact directly with the Android operating system.

With this upgrade, we introduced several new features that help you to better integrate Wowza Flowplayer into your Android projects using the SDK. These features and improvements include:

  • Support for Picture-in-Picture (PiP) mode.
  • Support for background playback and media session integration.
  • New playback control user interface.
  • Integration of Media3 ExoPlayer.
  • Replacement of RxJava with Kotlin Coroutines.
  • Integration of the core and common libraries into one.
  • Support to control the player using Google Assistant.
  • Updates to the demo applications for more effective usage.
  • Improvements to the reference documentation with the Dokka API documentation engine for Kotlin.

Breaking changes

We attempted to keep public API changes to a minimum. However, if you're migrating from a legacy version of the SDK, you should consider the breaking changes mentioned in the following sections before upgrading to v2.0.

New Maven artifact ID

The artifactId of the SDK changed from flowplayer-core to flowplayer. You can declare the full dependency in the following manner:

v2.0Legacy
Copy
Copied
dependencies {
    implementation 'com.flowplayer.android.player:flowplayer:X.X.X'
}
Copy
Copied
dependencies {
    implementation 'com.flowplayer.android.player:flowplayer-core:X.X.X'
}

Player setup

With this version of the Android SDK, the FlowplayerView class doesn't implement the Flowplayer interface any longer. Instead, it holds a reference to the Flowplayer instance. See Create a player instance for more information and recommendations.

Chromecast removal

The Chromecast library was removed with v2.0 of the SDK, but we plan on reintroducing it in a future update. If you need Chromecast support, we suggest using v1.4.0 of the SDK until then.

Removals and renamings

Removed Type Explanation or recommendation
ImaSettings Class The language for the ad overlay is now automatically detected based on the user's device preferences.
FlowplayerFragment Class Rename and use the FlowplayerSupportFragment class instead.
BasePlayer Class No longer public. Removed without replacement.
LifecycleListener Interface No longer public. Removed without replacement.
MediaPlayer Interface No longer public. Removed without replacement.
Metadata Class Moved from com.flowplayer.android.player.network.model to com.flowplayer.android.player.event.model.

New additions

Event listener changes

The event listners in the following table were added to the public API. See the full reference documentation for additional details.

Available events Listener interface
DurationChangeEvent OnDurationChangeListener
LiveEvent OnLiveStateListener
ProgressEvent OnProgressListener

Method changes

The methods in the following table were added to the public API. For a full reference and additional details about parameters and default settings, see the Flowplayer Functions reference documentation.

Method Description
onPictureInPictureModeChanged(args) Handles changes in the host activity's or fragment's Picture-in-Picture (PiP) mode.
setMediaNotificationTapIntent(args) Sets the android.app.PendingIntent to be triggered when the user taps on the media notification.
setShouldPauseOnBackground(args) Sets the behavior of the video player when the host activity is paused.