科尔多瓦从缓冲区读取html5视频

时间:2019-02-15 10:00:46

标签: javascript android html5 cordova browser-cache

我有一个带有视频标记的基于html5的webapp

<video controls>
  <source src="fake.website.com/movie.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

为了节省客户端的数据使用量,我希望能够缓存视频。目前,我将图像作为基本的

if(url in cache) var image = '<image src="base64string">';
else var image = '<image src="url">';

为避免两次下载视频,是否有一种方法可以从缓冲区读取视频以进行缓存?

例如

video.on('ended', function() { //read video and save to cache});

编辑:应用程序基于Cordova,因此浏览器将为Android / iOS Webviews

0 个答案:

没有答案