h265web.js
h265web.js copied to clipboard
播放h265流的时候,player.resize和player.snapshot方法报错
播放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')
把s=a.getElementsByTagName("canvas")[0]改为s=a.getElementsByTagName("video")[0]就正常了
2、调用方法snapshot,报错this.player.setScreen is not a function
把0===this.playParam.videoCodec改为false就正常了