2019-09-25 14:15题主

求助:dataView里添加了html video,如何在点击事件里全屏显示?

A.xwl里的dataview1.tpl

<tpl for='.'>
<div class='wb_item' style='width:330px;height:280px;' >
<video style="border:1px solid #DCDCDC;margin:0px;" 
  src={SPDZ}
  width="320px" height="240px" 
  controls="controls" controlslist="nodownload" preload="auto" x5-playsinline="" playsinline="" webkit-playsinline="" 
  onclick='if(this.paused){
    
    var ele = this;
    if (ele .requestFullscreen) {
        ele .requestFullscreen();
    } else if (ele .mozRequestFullScreen) {
        ele .mozRequestFullScreen();
    } else if (ele .webkitRequestFullScreen) {
        ele .webkitRequestFullScreen();
    }
    
    this.play();
  }
  else{
    this.pause();
  }'
>
</video>
<p>{SPMC}</p>
</div>
</tpl>
2019-09-26 09:44#1
可以​通过iframe来嵌入模块
2019-09-26 11:31#2
感谢回复,我试了下用iframe集成






最终想要达成的效果如下,现在就少一个点击全屏事件了:

返回开发者社区