I am trying to play videos(DRM enalbed) in brightcove video player.
What I did so far is. also I have extend the class with BrightcovePlayer
// Get the event emitter from the SDK
EventEmitter eventEmitter = brightcoveVideoView.getEventEmitter();
// Create a catalog request to fetch a video
String account = getString(R.string.account);
Catalog catalog = new Catalog.Builder(eventEmitter, account)
.setBaseURL(Catalog.DEFAULT_EDGE_BASE_URL)
.setPolicy(getString(R.string.policy))
.build();
// Get the video by ID
catalog.findVideoByID(getString(R.string.videoId), new VideoListener() {
@Override
public void onVideo(Video video) {
// Add video to the view
brightcoveVideoView.add(video);
// Start video playback
brightcoveVideoView.start();
}
});
XML layout is
<com.brightcove.player.view.BrightcoveExoPlayerVideoView
android:id="@+id/brightcove_video_view"
android:layout_width="match_parent"
android:layout_height="280dp"
android:layout_gravity="center_horizontal|top"/>
This is just showing video controls only not playing the videos
Brightcove recommend using ExoPlayer for Widevine DRM protected content - on Android you will most likely be using Widevine DRM as it is the native DRM for Android.
(https://sdks.support.brightcove.com/features/content-security-drm-native-player-sdks.html)
The link above includes a link to a sample: https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/WidevineModularSampleApp/src/main