问题
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