简体   繁体   English

Videoportal PWA(Progressive Web App)视频离线功能?

[英]Videoportal PWA (Progressive Web App) Video offline function?

We want to build a Videoportal as a PWA.我们想将 Videoportal 构建为 PWA。 Every video will have a watch offline feature.每个视频都有离线观看功能。 Can this be done via the Serviceworker caching?这可以通过 Serviceworker 缓存来完成吗? Or should another Download-Mechanism enable this Feature.或者另一个下载机制是否应该启用此功能。 The videos size is about 120mb.视频大小约为 120mb。 Target Device is Android and Web.(Sorry for bad english)目标设备是 Android 和 Web。(抱歉英语不好)

Yes, you can use the Cache Storage API along with service workers to handle offline video playback.是的,您可以将缓存存储 API 与服务工作者一起使用来处理离线视频播放。

There's a complete sample app at https://github.com/googlearchive/sample-media-pwa . https://github.com/googlearchive/sample-media-pwa 上有一个完整的示例应用程序。

If you were to use the Workbox libraries for handling your caching logic, then this guidance should help .如果您要使用 Workbox 库来处理缓存逻辑,那么本指南应该会有所帮助 If you don't end up using Workbox, then you'll need to implement some logic to handle Range: requests in your service worker, or else your video playback will likely not behave as expected when the <video> element tries to load a partial chunk of video bytes.如果你最终没有使用 Workbox,那么你需要实现一些逻辑来处理Range:服务工作者中的请求,否则当<video>元素尝试加载一个部分视频字节块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 渐进式 Web 应用程序“无法脱机工作”错误 - Progressive Web App "does not work offline" error 渐进式Web应用程序脱机刷新不起作用 - Progressive web app offline refresh doesn't work Chrome 移动渐进式网络应用在离线时返回错误 - Chrome mobile progressive web app returns error when offline 渐进式 web 应用程序 (PWA) 无法在 android 手机的屏幕上弹出推送通知 - Progressive web app (PWA) not able to make push notifications pop up on screen of android phone 为渐进式 web 应用程序(PWA)添加“徽章通知” - Add "badge notification" for progressive web application (PWA) 带有 nodejs+expressjs 的 PWA(渐进式 Web 应用程序)在启动时指向 /public/ 文件夹。 怎么修? - PWA (progressive web app) with nodejs+expressjs points to /public/ folder at start. How to fix? 渐进式Web应用程序的局限性:将本机应用程序转换为渐进式Web应用程序 - Limits of Progressive Web Apps: transforming a native app into a progressive web app 有没有办法使用渐进式网络应用程序 (PWA) 添加徽章通知? - Is there a way to add badge notifications using progressive web apps (PWA)? 通过渐进式Web应用程序打开Android应用程序 - Open Android app from a progressive web app 渐进式 Web 应用程序 - 迄今为止的所有可用权限 - Progressive Web App - All available permissions to date
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM