Im on Windows 7 Pro. I develop locally and then host/serve remotely. Trying to load a local mp4 file while developing locally ran into this identical situation. No combination of using localhost/myvideo.mp4 or 127.0.0.1/myvideo.mp4 or /aaa/myvideo.mp4 or myvideo.mp4 in same directory as file got things to work...but referencing a full URL like http://www.mywebsite.com/myvideo.mp4
did, as above.
On local machine, Chrome shows no error messages...just shows black box with controls. No clues as to whats up. Switched to IE and it showed the black box and controls and the error message. 'Invalid source'
I focused on @steveax question and Mime types.
Turns out IIS in this version of windows/IIS does not have a MIME type setup for .mp4. No clue why not...but not.
To add the MP4 MIME type, open Internet Information Services (IIS) Manager and follow these steps:
- Highlight Default Web Site on the left panel;
- Double-click MIME Types on the right panel;
- Scroll down the list and notice that there is no .mp4;
- On the right panel again, click Add: at the first field, write
.mp4
and on the field below write video/mp4
- Click OK and you are done.
Restart IIS!