Here is my code snippet:
<video id="myVideo" style="width: 640px; height: 480px; border: solid 1px #ccc;"></video>
<button onclick="showError()">Click Me</button>
<script type="text/javascript">
function showError() {
console.log('clicked');
var v = document.getElementById('myVideo');
v.addEventListener('error',function(e){
console.log('>> error happened');
},true);
v.src = 'http://127.0.0.1:9999/test.mp4';
v.load();
v.play();
}
</script>
The video source url is not available, so when click the button , the "error" event should be dispatched. It works on safari of iOS 8.1, but failed on iOS 8.2. Is there any workaround to make it works?