小程序可以缓存多少视频?

小程序 文章 2020-09-04 10:21 657 0 全屏看文

AI助手支持GPT4.0

小程序可以缓存多少视频?How many videos can the Mini Program cache?

小程序可以缓存多少视频?

在小程序做仿抖音功能。播放的视频超过12个之后就加载不出来了,有什么处理方法吗

In the small program tiktok function. After playing more than 12 videos, they can't be loaded. What's the solution

回答:

They Say:

只要一个video就行,最多不要超过3个

如果你要做抖音那种效果可以使用https://developers.weixin.qq.com/miniprogram/dev/extended/component-plus/video-swiper.html

小白大白:

使用swiper

外层用block去循环

使用swiper-item包裹视频标签

视频组件

。。。

this.videoShowDatas.push(...videoDatas.data.records) // 每次调用接口都会push进去

丶晓晓晓包:

每划一下视频就加载一个video组件吗?

小白大白:每滑动一次加载一个video组件
丶晓晓晓包:一个页面一个video组件就行了,过多会导致页面体验不佳,建议切换src的方式实现,反正之前做相关产品时是这样做的
小白大白:使用swiper
外层用block去循环
使用swiper-item包裹视频标签
    视频组件
。。。
this.videoShowDatas.push(...videoDatas.data.records) // 每次调用接口都会push进去

-EOF-

AI助手支持GPT4.0