有奖捉虫:行业应用 & 管理与支持文档专题 HOT
Windows 端的同层渲染元素设置 display: none; 样式去隐藏,会导致该元素被 PPAPI 插件误认为被销毁。
可以尝试以下的方式去设置样式隐藏元素:
width: 0px;
height: 0px;
opacity: 0;
visibility: hidden;
或者:
// 使其在页面中不可见
position: fixed;
top: -1000px;
left: -1000px;
iOS 端的同层渲染元素若没有宽高会导致客户端找不到 HTML 页面的元素挂载点,建议在 HTML 页面中给 tm-live-video、tm-audio 或者 tm-video 标签设置最小宽高。
如:
<style>
tm-live-video, tm-audio, tm-video{
min-width: 10px;
min-height: 10px;
}
</style>
创建 <tm-live-video>、 <tm-video> 和 tm-audio&amp;gt; 等自定义标签元素前需要先进行 js-api 接口鉴权。
注意
需要在 js-api 接口鉴权成功之后,才能在页面中添加 tm-live-videotm-videotm-audio 等自定义标签。否则自定义标签在调用 wemeet.createLiveVideoContextwemeet.createVideoContextwemeet.createAudioContext 初始化接口会报"Need to call JSAPI config first."的错误。