Open panyingdaoz opened 6 years ago
理论上来说,打开一个视频会调用两次,第一次是视频原始的分辨率,第二次是根据 DAR 信息计算后的实际比例。大多数情况下两次数据是一致的,之后考虑减少到一次
在 2018年3月13日,14:38,panyingdaoz notifications@github.com 写道:
你好PLOnVideoSizeChangedListener这个监听会在哪些情况下调用呢?我的为什么每次切换播放调用两次。 03-13 14:34:31.873 20002-20135/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:824)#timePlay ] 可以播放 03-13 14:34:32.223 20002-20002/com.kingbird.advertisting E/VideoTextureActivity: [ (VideoTextureActivity.java:1205)#onVideoSizeChanged ] onVideoSizeChanged: width = 1280, height = 720 03-13 14:34:32.233 20002-20002/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:1212)#onVideoSizeChanged ] 执行播放 03-13 14:34:32.433 20002-20002/com.kingbird.advertisting E/VideoTextureActivity: [ (VideoTextureActivity.java:1205)#onVideoSizeChanged ] onVideoSizeChanged: width = 1280, height = 720 03-13 14:34:32.433 20002-20002/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:1212)#onVideoSizeChanged ] 执行播放
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pili-engineering/PLDroidPlayer/issues/868, or mute the thread https://github.com/notifications/unsubscribe-auth/AEEwlnzp1gMm0rYxE3xyQdtzO20sQ0Fnks5td2l5gaJpZM4SoJ7z.
@zshbleaker 我是在第一次运行播放时,显示只调用一次,后面我在做PLOnCompletionListener调用后播放,就会调用PLOnVideoSizeChangedListener两次
我与demo测试了下是PLOnCompletionListener后mVideoView.setVideoPath(videoPath);会调用一次,由于直接在PLOnCompletionListener中调用start(mVideoView.start();)是无法播放的,所有我就添加了PLOnPreparedListener这个监听,在这里面再mVideoView.start();所以就会调用两次,你们看看能不处理下在PLOnCompletionListener里(mVideoView.start();)就能播放,就不需要添加PLOnPreparedListener来再调用start方法,就不会执行两次PLOnVideoSizeChangedListener
这个问题在开发版中已经修复,感谢反馈
你好PLOnVideoSizeChangedListener这个监听会在哪些情况下调用呢?我的为什么每次切换播放调用两次。 03-13 14:34:31.873 20002-20135/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:824)#timePlay ] 可以播放 03-13 14:34:32.223 20002-20002/com.kingbird.advertisting E/VideoTextureActivity: [ (VideoTextureActivity.java:1205)#onVideoSizeChanged ] onVideoSizeChanged: width = 1280, height = 720 03-13 14:34:32.233 20002-20002/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:1212)#onVideoSizeChanged ] 执行播放 03-13 14:34:32.433 20002-20002/com.kingbird.advertisting E/VideoTextureActivity: [ (VideoTextureActivity.java:1205)#onVideoSizeChanged ] onVideoSizeChanged: width = 1280, height = 720 03-13 14:34:32.433 20002-20002/com.kingbird.advertisting E/VideoTextureActivity.java: [ (VideoTextureActivity.java:1212)#onVideoSizeChanged ] 执行播放