Html5 video blob on iOS 9

a 夏天 提交于 2020-01-06 19:59:12

问题


Loading a video (mp4/H264) to a blob through xhr, then using such blob as the source for an HTML5 Video element.

var vsource = window.URL.createObjectURL(blob);
var player  = document.getElementById("player");
player.src = vsource;
player.play();

The above has been working on pretty much every major desktop and mobile browser, with the exception of iOS Safari.

It was broken on iOS 7, worked on iOS 8, and stopped working again on iOS 9. I wonder if anyone is aware of this, and if there is any workaround. Thanks

Edit: Safari: unable to dynamically load video from blob url

The last line, which says "UPDATE, 2015: It works now, updated the code." seems to imply it has been fixed. But to me, it doesn't seem so..


回答1:


Fixed (again) by Apple as of iOS 9.2.



来源:https://stackoverflow.com/questions/34658581/html5-video-blob-on-ios-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!