From what I searched for, Chrome has the codecs to play MKV videos. But, so far, I haven't found anything that allows, using Javascript / HTML5, to select the audio tracks available in the MKV
and AVI
files.
Can anyone give me a light on how to do this?
My idea was to create a web player to play this type of file, with the possibility to select the audio track and display subtitles.
The audioTracks
property allows you to do this. However, as stated in the documentation here https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks
From version 37: this feature is behind the enable-experimental-web-platform-features >preferences (needs to be set to enabled). To change preferences in Chrome, visit >chrome://flags.
I've tried this and it works at least for video
elements that have an mkv
file as a source.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.