Media3 v1.3.0 and ExoPlayer 2.19.1 with MediaMelon SDK
This guide is for integrating MediaMelon SDK with Media3 v1.3.0 and Exoplayer v2.19.1
Last updated
Was this helpful?
This guide is for integrating MediaMelon SDK with Media3 v1.3.0 and Exoplayer v2.19.1
Last updated
Was this helpful?
Meida3 - v1.3.0 .
MediaMelon SmartSight SDK Maven dependencies or the provided smartstreaming_release.aar
AAR file is necessary.
$MEDIA3PROJETC = {Media3 - v1.3.0}
The SDK files should be added to the build environment and the required network permissions should be enabled.
Using Maven:
Add MediaMelon Maven dependency to $MEDIA3PROJETC/demos/main/build.gradle
Using AAR:
Copy smartstreaming-release.aar
provided with the release package to the Media3 project. Example $MEDIA3PROJETC/demos/main/smartstreaming-release.aar
Add the following library to $MEDIA3PROJETC/demos/main/build.gradle
:-
To use MediaMelon SDK you have to implement both media3 and Exoplayer dependencies.
Add network permissions to $MEDIA3PROJETC/demos/main/src/main/AndroidManifest.xml
The player application must register the SDK and provide player information once when the application launches. Please note that values provided in this integration step persist across video sessions. This is typically done when the player itself is initialized.
$MEDIA3PROJETC/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java
Setup MediaMelon Adapter Object before onCreate()
method in $MEDIA3PROJETC/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java
The player application must register the SDK and provide player information once after player is initialized. Please note that values provided in this integration step persist across video sessions.
The SDK must be initialized at the start of each video session. Initialization includes setting the application context, initializing the playback session, and indicating the intent for playback with the SDK.
Set the isLive
variable in initializeSession() call , set true for live stream else false.
In $MEDIA3PROJETC/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java