当前位置: 首页 > 知识库问答 >
问题:

在android Broghtcove Exoplayer实现中播放一个又一个视频

谈桐
2023-03-14

我正在尝试在Android中使用Brightcove Exoplayer播放一个接一个的视频。我能够在第一个视频结束时捕捉eventtype“Completed”,然后我试图播放下一个视频。但它卡在了第一个视频的结尾。第二个视频没有播放。我得到一个NullPointerException。我做错了什么?这是我的代码:

public class MainActivity extends BrightcovePlayer {

    private final String TAG = this.getClass().getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        setContentView(R.layout.activity_main);
        brightcoveVideoView = (BrightcoveExoPlayerVideoView) findViewById(R.id.brightcove_video_view);
        super.onCreate(savedInstanceState);

        EventEmitter eventEmitter = brightcoveVideoView.getEventEmitter();
        final Catalog catalog = new Catalog(eventEmitter, "accountID", "policy");

        catalog.findVideoByID("videoID1", new VideoListener() {

            @Override
            public void onVideo(Video video) {
                Log.v(TAG, "onVideo: video = " + video);
                brightcoveVideoView.add(video);
                brightcoveVideoView.start();
            }


        });

        eventEmitter.on("completed", new EventListener() {
            @Override
            public void processEvent(Event event) {

               catalog.findVideoByID("videoID2", new VideoListener() {

                    @Override
                    public void onVideo(Video video) {
                        brightcoveVideoView.clear();
                        brightcoveVideoView.stopPlayback();
                        brightcoveVideoView.seekTo(0);
                        Log.v(TAG, "onVideo: video = " + video);
                        brightcoveVideoView.add(video);
                        brightcoveVideoView.start();
                    }


                });
            }
        });


        // Log whether or not instance state in non-null.
        if (savedInstanceState != null) {
            Log.v(TAG, "Restoring saved position");
        } else {
            Log.v(TAG, "No saved state");
        }
    }
}

logcat:

09-16 18:49:22.960  32438-32438/com.brightcove.player.samples.exoplayer.basic D/PlayButtonController﹕ Process event: completed.
09-16 18:49:22.960  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ Start of sync update: text = ; description = Pause.
09-16 18:49:22.970  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ End of sync update: text = ; description = Play.
09-16 18:49:22.970  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didPause { playheadPosition: 0 }
09-16 18:49:22.980  32438-32438/com.brightcove.player.samples.exoplayer.basic D/PlayButtonController﹕ Process event: didPause.
09-16 18:49:22.980  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ Start of sync update: text = ; description = Play.
09-16 18:49:22.980  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ End of sync update: text = ; description = Play.
09-16 18:49:22.980  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onMeasure: width = 1024, height = 550, videoWidth = 1024, videoHeight = 576, widthMode = MeasureSpec.EXACTLY, heightMode = MeasureSpec.EXACTLY
09-16 18:49:22.990    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now Flushing
09-16 18:49:22.990    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now Executing
09-16 18:49:22.990    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now Flushing
09-16 18:49:22.990    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now Executing
09-16 18:49:22.990  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onLayout: changed = false, left = 0, top = 0, right = 1024, bottom = 550
09-16 18:49:23.000  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadStarted: sourceId: 0, length: -1, type: 1, trigger: 0, bitrate: 1351359, mediaStartTimeMs: 0, mediaEndTimeMs: 10000
09-16 18:49:23.250  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didHideMediaControls { }
09-16 18:49:23.480  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onMeasure: width = 1024, height = 550, videoWidth = 1024, videoHeight = 576, widthMode = MeasureSpec.EXACTLY, heightMode = MeasureSpec.EXACTLY
09-16 18:49:23.480  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onLayout: changed = false, left = 0, top = 0, right = 1024, bottom = 550
09-16 18:49:26.103    32438-336/com.brightcove.player.samples.exoplayer.basic D/dalvikvm﹕ GC_FOR_ALLOC freed 712K, 35% free 6530K/9900K, paused 28ms, total 28ms
09-16 18:49:26.573    32438-336/com.brightcove.player.samples.exoplayer.basic D/dalvikvm﹕ GC_FOR_ALLOC freed 8K, 34% free 6780K/10160K, paused 28ms, total 28ms
09-16 18:49:26.804  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadCompleted: sourceId: 0, bytesLoaded: 1984152, type: 1, bitrate: 1351359, startTime: 0, endTime: 10000
09-16 18:49:26.804  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadStarted: sourceId: 0, length: -1, type: 1, trigger: 0, bitrate: 1351359, mediaStartTimeMs: 10000, mediaEndTimeMs: 20000
09-16 18:49:27.134    32438-336/com.brightcove.player.samples.exoplayer.basic D/dalvikvm﹕ GC_FOR_ALLOC freed 30K, 33% free 7037K/10420K, paused 22ms, total 22ms
09-16 18:49:27.514    32438-336/com.brightcove.player.samples.exoplayer.basic D/dalvikvm﹕ GC_FOR_ALLOC freed 5K, 32% free 7293K/10680K, paused 20ms, total 20ms
09-16 18:49:27.855    32438-336/com.brightcove.player.samples.exoplayer.basic D/dalvikvm﹕ GC_FOR_ALLOC freed 3K, 31% free 7549K/10940K, paused 29ms, total 29ms
09-16 18:49:28.555  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadCompleted: sourceId: 0, bytesLoaded: 1221624, type: 1, bitrate: 1351359, startTime: 10000, endTime: 20000
09-16 18:49:28.555  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadStarted: sourceId: 0, length: -1, type: 1, trigger: 0, bitrate: 1351359, mediaStartTimeMs: 20000, mediaEndTimeMs: 30000
09-16 18:49:33.590  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ onLoadCompleted: sourceId: 0, bytesLoaded: 1779232, type: 1, bitrate: 1351359, startTime: 20000, endTime: 30000
09-16 18:49:42.289  32438-32438/com.brightcove.player.samples.exoplayer.basic D/BrightcoveMediaController﹕ Processing onTouch for view: com.brightcove.player.view.BrightcoveExoPlayerVideoView{41dff550 VFE...C. .F...... 0,0-1024,550 #7f0b0000 app:id/brightcove_video_view}, with event: MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=452.44183, y[0]=261.5192, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=9956540, downTime=9956540, deviceId=3, source=0x1002 }.
09-16 18:49:42.289  32438-32438/com.brightcove.player.samples.exoplayer.basic D/BrightcoveMediaController﹕ The control bar is hidden, show the media controls...
09-16 18:49:42.289  32438-32438/com.brightcove.player.samples.exoplayer.basic I/BaseVideoView﹕ onTouchEvent
09-16 18:49:42.289  32438-32438/com.brightcove.player.samples.exoplayer.basic D/BrightcoveShowHideController﹕ Showing the media controls.  They will be hidden in 3000 milliseconds using animation style: FADE.
09-16 18:49:42.299  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ showMediaControls { }
09-16 18:49:42.299  32438-32438/com.brightcove.player.samples.exoplayer.basic D/BrightcoveShowHideController﹕ Showing the media controls.  They will be hidden in 3000 milliseconds using animation style: FADE.
09-16 18:49:42.299  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onMeasure: width = 1024, height = 550, videoWidth = 1024, videoHeight = 576, widthMode = MeasureSpec.EXACTLY, heightMode = MeasureSpec.EXACTLY
09-16 18:49:42.299  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onLayout: changed = false, left = 0, top = 0, right = 1024, bottom = 550
09-16 18:49:42.309  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didShowMediaControls { controlsHeight: 64 }
09-16 18:49:42.309  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didShowMediaControls { controlsHeight: 64 }
09-16 18:49:45.302  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didHideMediaControls { }
09-16 18:49:45.512  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onMeasure: width = 1024, height = 550, videoWidth = 1024, videoHeight = 576, widthMode = MeasureSpec.EXACTLY, heightMode = MeasureSpec.EXACTLY
09-16 18:49:45.512  32438-32438/com.brightcove.player.samples.exoplayer.basic V/BaseVideoView﹕ onLayout: changed = false, left = 0, top = 0, right = 1024, bottom = 550
09-16 18:49:49.876    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ response: {"description":null,"poster_sources":[{"src":"http://brightcove.vo.llnwd.net/v1/unsecured/media/accountID/201508/3522/accountID_4446404273001_videoID2-vs.jpg?pubId=accountID&videoId=videoID2"}],"tags":[],"cue_points":[],"custom_fields":{},"account_id":"accountID","sources":[{"avg_bitrate":997000,"width":640,"duration":134000,"size":16791137,"stream_name":"mp4:accountID/accountID_4446405618001_videoID2.mp4&1442415600000&782ccdd093adf6c97a4d9bc7d2962a49","codec":"H264","asset_id":"4446405618001","container":"MP4","height":360,"app_name":"rtmp://brightcove.fcod.llnwd.net/a500/e1/uds/rtmp/ondemand"},{"avg_bitrate":997000,"width":640,"src":"http://brightcove.vo.llnwd.net/e1/uds/pd/accountID/accountID_4446405618001_videoID2.mp4?pubId=accountID&videoId=videoID2","size":16791137,"height":360,"duration":134000,"container":"MP4","codec":"H264","asset_id":"4446405618001"},{"avg_bitrate":514000,"width":480,"duration":134000,"size":8664661,"stream_name":"mp4:accountID/accountID_4446405652001_videoID2.mp4&1442415600000&782ccdd093adf6c97a4d9bc7d2962a49","codec":"H264","asset_id":"4446405652001","container":"MP4","height":270,"app_name":"rtmp://brightcove.fcod.llnwd.net/a500/e1/uds/rtmp/ondemand"},{"avg_bitrate":514000,"width":480,"src":"http://brightcove.vo.llnwd.net/e1/uds/pd/accountID/accountID_4446405652001_videoID2.mp4?pubId=accountID&videoId=videoID2","size":8664661,"height":270,"duration":134000,"container":"MP4","codec":"H264","asset_id":"4446405652001"},{"avg_bitrate":1831000,"width":960,"duration":134000,"size":30751569,"stream_name":"mp4:accountID/accountID_4446407440001_videoID2.mp4&1442415600000&782ccdd093adf6c97a4d9bc7d2962a49","codec":"H264","asset_id":"4446407440001","container":"MP4","height":540,"app_name":"rtmp://brightcove.fcod.llnwd.net/a500/e1/uds/rtmp/ondemand"},{"avg_bitrate":1831000,"width":960,"src":"http://brightcove.vo.llnwd.net/e1/uds/pd/accountID/accountID_4446407440001_videoID2.mp4?pubId=accountID&videoId=videoID2","size":30751569,"height":540,"duration":134000,"container":"MP4","codec":"H264","asset_id":"4446407440001"},{"type":"application/x-mpegURL","src":"http://c.brightcove.com/services/mobile/streaming/index/master.m3u8?videoId=videoID2&pubId=accountID","container":"M2TS","codec":"H264"},{"type":"application/x-mpegURL","src":"https://secure.brightcove.com/services/mobile/streaming/index/master.m3u8?videoId=videoID2&pubId=accountID&secure=true","container":"M2TS","codec":"H264"}],"name":"Control And Coordination (Scared - X+Y).mp4","reference_id":null,"long_description":null,"duration":134000,"published_at":"2015-08-27T21:46:17.492Z","text_tracks":[],"updated_at":"2015-08-27T21:46:17.492Z","thumbnail":"http://brightcove.vo.llnwd.net/v1/unsecured/media/accountID/201508/3522/accountID_4446404304001_videoID2-th.jpg?pubId=accountID&videoId=videoID2","poster":"http://brightcove.vo.llnwd.net/v1/unsecured/media/accountID/201508/3522/accountID_4446404273001_videoID2-vs.jpg?pubId=accountID&videoId=videoID2","link":null,"id":"videoID2","ad_keys":null,"thumbnail_sources":[{"src":"http://brightcove.vo.llnwd.net/v1/unsecured/media/accountID/201508/3522/accountID_4446404304001_videoID2-th.jpg?pubId=accountID&videoId=videoID2"}],"created_at":"2015-08-27T07:11:46.648Z"}
09-16 18:49:49.876    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ code: 200
09-16 18:49:49.876    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ message: OK
09-16 18:49:49.896    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ issuing GET request: https://metrics.brightcove.com/tracker?platform=android-native-sdk&device_os_version=4.4.2&range=27..28&device_type=tablet&destination=bcsdk%3A%2F%2FExoPlayer+Sample+App%2Fcom.brightcove.player.samples.exoplayer.basic&device_os=android&time=1442409562964&platform_version=4.4.2&event=video_engagement&domain=videocloud&account=accountID&device_cpu=armeabi-v7a&video_duration=30&video=videoID1, headers: {}
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic D/BaseVideoView﹕ Seeking to 0
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic V/MainActivity﹕ onVideo: video = Video{name: "Control And Coordination (Scared - X+Y).mp4", sourceCollections: 2, cuePoints: 0}
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ willChangeVideo { currentVideo: null nextVideo: null index: 0 uuid: 96c2c14b-16b8-41fb-be17-00a3ec5fd907 }
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didChangeList { list: [Video{name: "Control And Coordination (Scared - X+Y).mp4", sourceCollections: 2, cuePoints: 0}] }
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ stop { playheadPosition: 0 }
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ ExoPlayerOnStopListener:
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ destroyPlayer: exoPlayer = com.google.android.exoplayer.ExoPlayerImpl@41f8c768
09-16 18:49:49.906  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ stopUpdater: null
09-16 18:49:49.906    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now Executing->Idle
09-16 18:49:49.916    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now Idle->Loaded
09-16 18:49:49.926    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now Loaded
09-16 18:49:49.946    32438-369/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.MARVELL.VIDEO.HW.CODA7542DECODER] Now uninitialized
09-16 18:49:49.956    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now Executing->Idle
09-16 18:49:49.966    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now Idle->Loaded
09-16 18:49:49.966    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now Loaded
09-16 18:49:49.966    32438-372/com.brightcove.player.samples.exoplayer.basic I/ACodec﹕ [OMX.SEC.aac.dec] Now uninitialized
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic D/PlayButtonController﹕ Process event: stop.
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ Start of sync update: text = ; description = Play.
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic V/AbstractButtonController﹕ End of sync update: text = ; description = Play.
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ seekTo { seekPosition: 0 }
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ ExoPlayerOnSeekListener:
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didChangeList { list: [Video{name: "Control And Coordination (Scared - X+Y).mp4", sourceCollections: 2, cuePoints: 0}] }
09-16 18:49:49.966  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ willChangeVideo { currentVideo: Video{name: "Control And Coordination (Scared - X+Y).mp4", sourceCollections: 2, cuePoints: 0} nextVideo: Video{name: "Control And Coordination (Scared - X+Y).mp4", sourceCollections: 2, cuePoints: 0} index: 0 uuid: 07a14bbe-6920-404b-a3d6-a74459cde927 }
09-16 18:49:49.976  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ setSource { }
09-16 18:49:49.976  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ ExoPlayerOnSetSourceListener
09-16 18:49:49.976  32438-32438/com.brightcove.player.samples.exoplayer.basic V/ExoPlayerVideoDisplayComponent﹕ destroyPlayer: exoPlayer = null
09-16 18:49:49.976  32438-32438/com.brightcove.player.samples.exoplayer.basic E/com.brightcove.player.event.EventEmitterImpl@41e01b08﹕ processEvent() threw a throwable.
    java.lang.NullPointerException
            at com.brightcove.player.display.ExoPlayerVideoDisplayComponent.openVideo(ExoPlayerVideoDisplayComponent.java:425)
            at com.brightcove.player.display.ExoPlayerVideoDisplayComponent$ExoPlayerOnSetSourceListener.processEvent(ExoPlayerVideoDisplayComponent.java:533)
            at com.brightcove.player.event.EventEmitterImpl.invokeListenersForEventType(EventEmitterImpl.java:457)
            at com.brightcove.player.event.EventEmitterImpl.invokeListenersForEvent(EventEmitterImpl.java:428)
            at com.brightcove.player.event.EventEmitterImpl.access$300(EventEmitterImpl.java:41)
            at com.brightcove.player.event.EventEmitterImpl$1.handleMessage(EventEmitterImpl.java:73)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5598)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)
09-16 18:49:49.976  32438-32438/com.brightcove.player.samples.exoplayer.basic D/MainActivity﹕ didStop { playheadPosition: 0 }
09-16 18:49:50.226    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ response: GIF89a������������������!�����������,��������������D��;
09-16 18:49:50.226    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ code: 200
09-16 18:49:50.226    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ message: OK
09-16 18:49:50.236    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ issuing GET request: https://metrics.brightcove.com/tracker?device_os=android&platform=android-native-sdk&device_os_version=4.4.2&time=1442409562964&platform_version=4.4.2&event=video_complete&device_type=tablet&domain=videocloud&account=accountID&device_cpu=armeabi-v7a&video_duration=30&video=videoID1&destination=bcsdk%3A%2F%2FExoPlayer+Sample+App%2Fcom.brightcove.player.samples.exoplayer.basic, headers: {}
09-16 18:49:50.477    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ response: GIF89a������������������!�����������,��������������D��;
09-16 18:49:50.477    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ code: 200
09-16 18:49:50.477    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ message: OK
09-16 18:49:50.487    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ issuing GET request: https://metrics.brightcove.com/tracker?device_os=android&platform=android-native-sdk&device_os_version=4.4.2&time=1442409589981&platform_version=4.4.2&event=video_impression&device_type=tablet&domain=videocloud&account=accountID&device_cpu=armeabi-v7a&video=videoID2&destination=bcsdk%3A%2F%2FExoPlayer+Sample+App%2Fcom.brightcove.player.samples.exoplayer.basic, headers: {}
09-16 18:49:50.727    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ response: GIF89a������������������!�����������,��������������D��;
09-16 18:49:50.727    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ code: 200
09-16 18:49:50.727    32438-332/com.brightcove.player.samples.exoplayer.basic D/HttpService﹕ message: OK

共有1个答案

吕新
2023-03-14

有点晚了,但考虑到没有答案...

扰乱视频列表(即在BC播放器中动态添加/删除视频对象--任何从BaseVideoView派生的对象)将很快使您脱轨,并使您1)哭泣或2)对无辜的旁观者尖叫:)

我有自己的理论,但与这个问题无关。

    null
 类似资料:
  • 本文向大家介绍写一个方法,实现使用canvas播放视频?相关面试题,主要包含被问及写一个方法,实现使用canvas播放视频?时的应答技巧和注意事项,需要的朋友参考一下 canvas draw by argb canvas draw by video 注:没有写fps控制

  • 我正在尝试在android中实现BrightCove Exoplayer。我能够成功地实现播放单个视频。现在我正在尝试使用Exoplayer播放播放列表。播放列表中的第一个视频,在第一个视频结束时,播放器不会播放播放列表中的下一个视频。它再次显示第一个视频的开头;如果我按下播放按钮,第一个视频将再次播放。我想实现连续播放播放列表中的所有视频。我错过什么了吗?我将我的代码张贴在下面: 主要活动:

  • 我想让应用程序逐帧播放功能。我想这是不可能与标准的Android工具。我尝试了VideoView和search kTo(当前的1000/帧率)方法,但它不起作用(我想它不会在暂停的视频上寻找)。我的问题是:我需要学习和使用什么来使它成为可能,什么工具和/或库?我是Android初学者,我没有工作的视频渲染早,所以我的知识,这是真的很低。

  • 我有一个包含以下元素的ArrayList: 我要将移到之后,以以下顺序: 我使用此代码: 上述代码的结果如下: 移动一个又一个元素的最佳方法是什么?

  • 一个播放器功能,现在需求将视频播放修改为播放图片。 我试过直接替换路径,但是图片加载需要时间,有些时候就会在图片还没有加载完成就调到下一章图片了,出现黑屏现象,因此需要图片提前加载几张才行,有什么方法可以解觉这个问题,或者有什么开源组件可以实现播放图片的功能

  • 我正在使用媒体播放器播放带有列表视图的原始文件夹中的音频文件。一切正常,但我有一个问题。 问题是:当第一个音频文件结束时,它播放第二个文件,但当第二个文件结束时,它不播放第三个文件。 问题是什么??我尝试在mp上添加setOnCompletionListener并重置mp并在(位置+1)中播放audion,这是真的吗? 我还有一个问题。当它结束播放listview中的第一个项目并开始播放第二个项目