微信小程序开发

微信小程序视频播放video,隐藏进度条,控制按钮

2018/8/27 20:37:52 人评论 次浏览

先看正确的代码:

<!-- 播放视频 -->

<view class="zhezao" hidden="{{!shopvideo}}">
  <video id="myVideo" class='myvideo-v' src="{{selectVideo.Video_Link}}" binderror="videoErrorCallback" controls="{{false}}" autoplay="{{true}}" show-play-btn="{{false}}"   bindplay="startplay" show-center-play-btn="{{false}}" bindtimeupdate="videotimeupdate" enable-progress-gesture="{{false}}"
    show-progress="{{false}}" show-fullscreen-btn="{{false}}">
    <cover-view class='myvideo-kz'>
      <cover-view class='daojishi-v'>
        {{leftMiao}}秒
      </cover-view>
      <cover-view class='guanbi-v' bindtap="closeVideoTC">
        关闭
      </cover-view>

    </cover-view>
    
  </video>
</view>


<!-- /播放视频 -->

可以看到有controls,autoplay,show-progress等等属性。 其值必须为{{false}},一定要带上2个大括号{}。不然无效。!!