mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
405 stars 137 forks source link

Add audio track switcher #188

Open dmorgenstern-init opened 3 years ago

dmorgenstern-init commented 3 years ago

Since mediaelement.js player uses https://github.com/video-dev/hls.js for streams, there should be a feature to switch between different audio tracks (e.g. for different languages) that are available in the .m3u8 file.

Example from JWPlayer:

image

https://www.jwplayer.com/developers/web-player-demos/hlsv4-audio-tracks/

Possible usage:

    features: [
        'playpause',
        'skipback',
        'current',
        'progress',
        'duration',
        'volume',
        'tracks',
        'a11y',
        'fullscreen',
        'audiowitcher',
      ],
agalindo-init commented 3 years ago

We have the same request for the quality switcher plugin, that uses to work if the markup follows the given plugin example: https://github.com/mediaelement/mediaelement-plugins/blob/master/demo/quality.html

But with the src attribute loading a .m3u8 file, containing the different qualities won't display the quality switcher. Working out of the box in mediaelement player would be a nive to have, e.g. for a live stream.