Correct behavior: error event should fire. Current behavior: no event fires. Reproduce with: <html> <body></body> <script> video = document.createElement("video"); video.addEventListener("error", function (err) { console.log("Could not load video"); }); video.src = "https://spins.arqspin.com/2c0rjp53jqhf8/spin.mp4"; // returns 403 video.load(); </script> </html>
The media element doesn't see the 403 error because CFNetwork rejects the self-signed certificate used by https://spins.arqspin.com. 2014-08-02 09:53:13.025 com.apple.WebKit.WebContent.Development[640:32798] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) [09:53:13.027] HTTPRequest figHttpRequestDidFailCallback: Network error: domain=kCFErrorDomainCFNetwork, code=-1202, The certificate for this server is invalid. You might be connecting to a server that is pretending to be ?spins.arqspin.com? which could put your confidential information at risk. for https://spins.arqspin.com/2c0rjp53jqhf8/spin.mp4 MediaPlayerPrivateAVFoundation::assetStatus - statusOfValueForKey failed for duration, error = The certificate for this server is invalid. You might be connecting to a server that is pretending to be “spins.arqspin.com” which could put your confidential information at risk.
AVFoundation does return an error, so we try again with QTKit but loadState never changes from QTMovieLoadStateLoading (1000): MediaPlayerPrivateQTKit::updateStates(0x7f9aea5a1f20) - exiting with networkState = 2, readyState = 0 2014-08-02 09:53:13.329 com.apple.WebKit.WebContent.Development[640:32798] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843) [09:53:13.330] HTTPRequest figHttpRequestDidFailCallback: Network error: domain=kCFErrorDomainCFNetwork, code=-1202, The certificate for this server is invalid. You might be connecting to a server that is pretending to be ?spins.arqspin.com? which could put your confidential information at risk. for https://spins.arqspin.com/2c0rjp53jqhf8/spin.mp4 MediaPlayerPrivateQTKit::loadedRangesChanged(0x7f9aea5a1f20) - loadState = 1000
ugh stupid mistake when cleaning up the url. It should be http://spins.arqspin.com/2c0rjp53jqhf8/spin.mp4 to avoid (irrelevant) SSL issues.
This seems to work fine these days.
Mass move bugs into the DOM component.
I am not able to reproduce this bug in Safari 15.6 on macOS based on the following JSFiddle (from Comment 0 and replacing URL from Comment 3 because HTTPS one was self-signed). Link - https://jsfiddle.net/h3bampwz/ In all browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6), it shows "Could not load video" error message in Console, which is expected result. I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Please reopen if you think it is incorrect testing or this issue is not resolved. Thanks!