scroll-view套video使其横向滚动,视频悬浮在手机上,怎么让它滚动?
发布于 6 年前 作者 ccao 328 次浏览 来自 问答

<view class=“most-new-content”>

    <view class=“most-new-content-desc”>{{mostNew[index].description}}</view>

    <scroll-view scroll-x=“true” style=" white-space: nowrap; display: flex;height:100%;" >

    <!-- <view > -->

        <video class=“section” poster=http://www.jshuaiweb.com/mini/jinyi/images/mostNew-1.png src=http://tbm.alicdn.com/Uob6TqgDJuggjUaP6bv/NNtoO48LH9fensAkefH%40%40sdregop.mp4 danmu-list="{{danmuList}}" enable-danmu danmu-btn controls bindtap=“bindfullscreenchange” objectFit=‘fill’>

        </video>

    <!-- </view> -->

        <image bindtap=‘touchStart’ wx:for="{{mostNew[index].imgUrl}}" wx:key=“index”  src="{{item}}"></image>

    </scroll-view>

</view>

2 回复
  1. tip: 请勿在 scroll-view 中使用 textareamapcanvasvideo 组件

看官方的说明 video标签是原生组件 不要用在scrollview里面

如果想video可以在列表页里面滚动 那么不要用scrollview 直接用一个超长view来滚动

但是内存和某些回调会出现一些问题 自行取舍

回到顶部