HTML5 video can play .mkv files?
HTML5 doesn't support any video formats, or rather HTML5 doesn't specify what formats browsers should support. It's up to the browsers to decide which formats they choose to support. Apparently Chrome plays .mkv, but I wouldn't be surprised if other browsers didn't play the same file.
How to play mkv files using HTML5 video tag?
WebM uses a variant of the Matroska container so it's not too surprising that some browsers are able to play some .mkv files. It's likely that you'd need to set the content type header to something that the browser recognises (eg. video/webm
) if it was going to work at all.
However, that's only part of the story. The Matroska container is just that, a container. Inside the container are video and audio objects which have been encoded with particular codecs, if the browser you're attempting to play the file with doesn't support those codecs then they won't be able to play the file even if they can parse the container format. If you want wide compatibility then your best option is to transcode to one of the more common container/codec combinations such as MP4/h264 or WebM/VP8.
Related Topics
Reverse Order of Columns in CSS Grid Layout
How to Display on HTML Page in Another HTML Page in Angular 4
Bootstrap Toggle Collapse Is Not Working
How to Prevent Line-Break in a Column of a Table Cell (Not a Single Cell)
Make Container Shrink-To-Fit Child Elements as They Wrap
Css Positioning Issues: Invalid Property Value
Css When Inline-Block Elements Line-Break, Parent Wrapper Does Not Fit New Width
Fluid Width With Equally Spaced Divs
How to Style the Parent Element When Hovering a Child Element
Why Does HTML Think "Chucknorris" Is a Color
Difference Between Id and Name Attributes in Html
Setting the Width of Inline Elements
Floated Elements of Variable Height Push Siblings Down
Why Aren't My Absolutely/Fixed-Positioned Elements Located Where I Expect