BrightCove视频播放器未在Android中播放DRM启用视频

发布于 2025-02-03 01:10:07 字数 1175 浏览 2 评论 0原文

我正在尝试在BrightCove视频播放器中播放视频(DRM enalbed)。 到目前为止,我所做的是。另外,我已经使用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布局

 <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"/>

扩展了课程

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏辞 2025-02-10 01:10:07

BrightCove建议将范围内的DRM受保护的含量使用 - 在Android上,您很可能会使用宽藤DRM,因为它是Android的本机DRM。

要查看Widevine模块化内容,您需要使用Exoplayer视频视图

https://sdks.support.brightcove.com/features/content-security-drm-native-native-player-sdks.html

上面的链接包括指向样本的链接:< =“ https://github.com/brightcoveos/android-player-samples/tree/master/master/master/brightcove-exoplayer/widevinemodularsampleapp/src/src/main” rel =“ nofollow noreflow norefloll noreferrer” -player-samples/tree/tree/master/brightcove-exoplayer/widevinemodularsampleapp/src/main

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.

To view Widevine Modular content, you need to use the ExoPlayer video view

(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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文