k***@sina.com
k***@sina.com
  • 发布:2021-03-25 13:00
  • 更新:2021-05-24 09:56
  • 阅读:693

【报Bug】video在android 5.1上崩溃

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 3.1.6

手机系统: Android

手机系统版本号: Android 5.1

手机厂商: 米投

手机机型: 米投投影仪 v1

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

按照如上代码,在android5.1设备上将视频设置为全屏。

预期结果:

全屏

实际结果:

崩溃

bug描述:

页面代码如下(去掉了条件编译的H5代码):

            <view class="left tvgroup-0-0  tvgroup-1-0">  
                <video id='video1' class="video video-js tvitem-0-0" :src="src" @click="togglePlay" @ended="onfinish"></video>  
            </view>  

        onReady() {  
            // #ifndef H5  
            this.context = uni.createVideoContext("video1");  
            this.play();  
            // #endif  
        },  

            fullScreen() {  
                // #ifndef H5  
                this.context.requestFullScreen({  
                    direction: -90  
                });  
                // #endif  
            },

每次执行fullScreen就会崩溃

2021-03-25 13:00 负责人:无 分享
已邀请:
k***@sina.com

k***@sina.com (作者) - unclex

在日志中看到的

W/System.err( 9829): java.lang.NoSuchMethodError: android.graphics.SurfaceTexture.isReleased

W/System.err( 9829): at io.dcloud.media.video.ijkplayer.media.TextureRenderView$InternalSurfaceHolder.bindToMediaPlayer(TextureRenderView.java:162)

W/System.err( 9829): at io.dcloud.media.video.ijkplayer.media.IjkVideoView.bindSurfaceHolder(IjkVideoView.java:955)

W/System.err( 9829): at io.dcloud.media.video.ijkplayer.media.IjkVideoView.access$2500(IjkVideoView.java:62)

W/System.err( 9829): at io.dcloud.media.video.ijkplayer.media.IjkVideoView$9.onSurfaceCreated(IjkVideoView.java:987)

W/System.err( 9829): at io.dcloud.media.video.ijkplayer.media.TextureRenderView$SurfaceCallback.onSurfaceTextureAvailable(TextureRenderView.java:280)

W/System.err( 9829): at android.view.TextureView.getHardwareLayer(TextureView.java:385)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13339)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13368)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.draw(View.java:14479)

W/System.err( 9829): at android.widget.FrameLayout.draw(FrameLayout.java:472)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13373)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13368)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.draw(View.java:14479)

W/System.err( 9829): at android.widget.FrameLayout.draw(FrameLayout.java:472)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13373)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13368)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.View.draw(View.java:14193)

W/System.err( 9829): at android.view.ViewGroup.drawChild(ViewGroup.java:3105)

W/System.err( 9829): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2942)

W/System.err( 9829): at android.view.View.draw(View.java:14479)

W/System.err( 9829): at android.widget.FrameLayout.draw(FrameLayout.java:472)

W/System.err( 9829): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2393)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13373)

W/System.err( 9829): at android.view.View.getDisplayList(View.java:13415)

W/System.err( 9829): at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)

W/System.err( 9829): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)

W/System.err( 9829): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2427)

W/System.err( 9829): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2299)

W/System.err( 9829): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1929)

W/System.err( 9829): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1046)

W/System.err( 9829): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5663)

W/System.err( 9829): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)

W/System.err( 9829): at android.view.Choreographer.doCallbacks(Choreographer.java:574)

W/System.err( 9829): at android.view.Choreographer.doFrame(Choreographer.java:544)

W/System.err( 9829): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)

W/System.err( 9829): at android.os.Handler.handleCallback(Handler.java:733)

W/System.err( 9829): at android.os.Handler.dispatchMessage(Handler.java:95)

W/System.err( 9829): at android.os.Looper.loop(Looper.java:136)

W/System.err( 9829): at android.app.ActivityThread.main(ActivityThread.java:5052)

W/System.err( 9829): at java.lang.reflect.Method.invokeNative(Native Method)

W/System.err( 9829): at java.lang.reflect.Method.invoke(Method.java:515)

W/System.err( 9829): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)

W/System.err( 9829): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)

W/System.err( 9829): at dalvik.system.NativeStart.main(Native Method)

E/UncaughtExceptionHandler( 9829): java.lang.NoSuchMethodError: android.graphics.SurfaceTexture.isReleased

k***@sina.com

k***@sina.com (作者) - unclex

日志是用一个小米手机弄出来的,4.4.4的版本。这个应用主要用在电视和投影仪上,小米电视 4k和投影仪都会崩溃,但是我不知道怎么取日志,所以找了台旧手机,估计问题是一样的。

DCloud_UNI_Anne

DCloud_UNI_Anne

k***@sina.com

k***@sina.com (作者) - unclex

android 4.4.4可稳定重现

unicorn_up

unicorn_up

android 5.1 下也会崩溃

9***@qq.com

9***@qq.com

android 5.0,硬解码方式,requestFullScreen会崩溃,软解码不会,求解决

  • unicorn_up

    我目前采用其它方案规避了这个问题。 video 直接全屏尺寸创建,不调用requestFullScreen就不会崩溃。uni目前对于电视和android6.0以下的设备在硬件方面总是有一些奇奇怪怪的问题。

    2021-05-25 09:38

要回复问题请先登录注册