Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

播放h265流的时候,player.resize和player.snapshot方法报错 #237

Open
Allenisme opened this issue Jun 21, 2023 · 0 comments
Open

Comments

@Allenisme
Copy link

播放h265流的时候,player.resize和player.snapshot方法报错

场景

播放h265流的时候,调用resize和调用snapshot方法都报错

视频 URL

http-flv格式的直播流

问题描述

播放h265流的时候,
player.resize方法报错Cannot read properties of undefined (reading 'style')
player.snapshot方法报错this.player.setScreen is not a function

是否偶发

补充

作者大大是否修改过代码,以前播h265的时候用canvas,现在直接用的video,但有些api未修改完成。
1、例如调用方法resize,获取canvas为空导致报错Cannot read properties of undefined (reading 'style')
image
把s=a.getElementsByTagName("canvas")[0]改为s=a.getElementsByTagName("video")[0]就正常了
2、调用方法snapshot,报错this.player.setScreen is not a function
image
把0===this.playParam.videoCodec改为false就正常了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant