简体   繁体   中英

HTML5 video player with multiple audio streams

Is it possible to run mp4 video with multiple audio streams in HTML5 video player and change the streams via button (language select). I already found a way to check for multiple streams in a video file but the solution works only in IE (the property name is AudioTrack). So is this possible to be done in Chrome and Firefox ?

Officially not support AudioTrack in other browser by following this reference( https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks ) How about add select button to change video source. And play various video by selected video source.

I have the exact same problem. HTMLMediaElement.audioTracks seems to be supported only in IE, Edge and Safari. I have tried Kaiido's answer suggestions, but still I am getting only one (the default) audio channel of the video file (mp4) in Chrome (with HTMLMediaElement.CaptureStream() ) and in Mozilla Nightly with configuration change in media.tracks.enabled set to true.

Any help will be appreciated, thank you in advance!

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM