问题
I have a video file in MKV format, i want to play that file in the browser without converting, how can i play this file format in browser?
<video width="320" height="240" controls>
<source src="movie.mkv" type="video/mkv">
Your browser does not support the video tag.
</video>
i want this file to be played in full screen mode always. My browser is chrome.
回答1:
It will refuse to play Matroska if the type attribute is set to video/x-matroska
. Try removing the type attribute completely.
After some experimentation with this issue, I've found the best solution is to set the mime type to video/webm
.
回答2:
I think Chrome doesn't play .mkv videos.
By the way, 'type' is mime-type, and mkv's mime type is video/x-matroska
.
Try:
source src="movie.mkv" type="video/x-matroska"
If this works, maybe the sound will be muted, so you can try type="video/mp4"
.
回答3:
I added the IIS Mime Type as (.mkv - video/webm) over the IIS option and it worked fine.
回答4:
I know this is old, but the best way is sending mkv to google drive. Google drive can play mkv with no problem. I don't know if you know, but you can have 15gb free on google drive, and you can embed it on your website.
来源:https://stackoverflow.com/questions/17018119/how-to-play-mkv-file-in-browser