Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to play MKV file in browser?

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.

like image 628
Nitin Aggarwal Avatar asked Sep 05 '25 03:09

Nitin Aggarwal


1 Answers

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.

like image 198
Matt Joiner Avatar answered Sep 07 '25 23:09

Matt Joiner