提交 260a9443 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 竖划视频模板的封面

上级 2819cc37
......@@ -15,7 +15,7 @@
<swiper class="swiper" :current="current" :circular="index != 0" :vertical="false" @change="onSwiperChange"
@transition="onTransition">
<swiper-item class="swiper-item" v-for="(item,i) in visibleList" :key="i">
<video :ref="'video-'+i" class="video" :id="item._id" :src="item.src" :poster="item.src+'?x-oss-process=video/snapshot,t_1000,f_jpg'"
<video :ref="'video-'+i" class="video" :id="item._id" :src="item.src" :poster="item.poster_src"
:show-center-play-btn="false" :autoplay="false" :controls="false" :loop="true"
@play="onPlay(i)" @pause="onPause(i)"
></video>
......@@ -31,7 +31,7 @@
</template>
<script>
import { VideoNode } from "uts.sdk.modules.DCloudUniVideo";
type ListItem = { _id : string, content : string, src : string }
type ListItem = { _id : string, content : string, src : string ,poster_src :string }
let page : number = 0;
export default {
......@@ -134,6 +134,12 @@
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/video/uni-ai.mp4',
'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/video/uni-verify.mp4'
] as string[]
let posterSrcList = [
'/static/template/swiper-vertical-video/poster/uni-uts.jpg',
'/static/template/swiper-vertical-video/poster/uni-ai.jpg',
'/static/template/swiper-vertical-video/poster/uni-verify.jpg'
] as string[]
let list = [] as ListItem[];
for (let i = 0; i < 6; i++) {
......@@ -141,7 +147,8 @@
let listItem : ListItem = {
"_id": "a00" + index,
"content": "这是第" + index + "条数据"+videoUrlList[i%3],
"src": videoUrlList[i%3]
"src": videoUrlList[i%3],
"poster_src":posterSrcList[i%3]
}
list.push(listItem)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册