HTML5 Video from a Password Protected directory in

2019-06-01 04:15发布

问题:

Has anyone had a similar problem, and have found a solution?

I have a page in a password protected directory that I would like to show video on, using the HTML5 video tag (with video.js, video tag is correct, and all fallback formats are included so no issue there). The problem is that Safari does not seem to play the video files when they are in the same PW protected directory, while all other browsers do. As soon as I move the vid files are out of the PW protected directory it plays fine.

Any thoughts / solutions?

回答1:

I had a very similar problem and found an answer here:

https://discussions.apple.com/thread/2448777?start=0&tstart=0

Your problem is an authentication error with Safari, Quicktime X, and HTTP basic authorization. If you check the box to remember the password in keychain then the movie plays in Safari.

Once I had Mac OS's keychain remember the password in Safari, my MP4 videos began playing in my password-protected directories!