plyr icon indicating copy to clipboard operation
plyr copied to clipboard

Add control for audio tracks (for streaming libraries and possibly external audio files)

Open mrinv3301 opened this issue 7 years ago • 23 comments
trafficstars

I've video with different translates. How can I choose between different vioce-overs, like I can do that with subtitles?

mrinv3301 avatar Jul 25 '18 18:07 mrinv3301

It's not supported in HTML5 video, but the streaming libraries can do it. https://github.com/sampotts/plyr/wiki/FAQ#1-does-plyr-work-with--

friday avatar Jul 27 '18 03:07 friday

Changed to a feature since it would be nice with a control for it in cases where it's supported. This is not a high prio however, and it's a long way to go.

friday avatar Jul 27 '18 03:07 friday

This feature would be greatly appreciated. I need to have a youtube live stream on my website with a different audio track/voiceover. I believe this would be the first player to support such feature. Thanks

SsgtS7ARK avatar Sep 06 '18 20:09 SsgtS7ARK

This is most important hls setting in any player. For this reason most people have to use jwplayer. I want to use and support this player but our all items has mutl audio settings.

If ur ideas will change any time about multi audio menu support, i will be using and supporting this project in out systems.

masterofthesith avatar Oct 02 '19 15:10 masterofthesith

Any update on this?

VAIBHAV7500 avatar Oct 31 '20 11:10 VAIBHAV7500

Good evening, are there any plans to implement the multi-track audio feature? Especially important in content with simultaneous translation. Thanks.

denilly avatar Mar 16 '21 21:03 denilly

+1

tobiasgoecke avatar Jan 21 '22 22:01 tobiasgoecke

Any update on this?

brahimaz avatar Mar 24 '22 22:03 brahimaz

Any update on this?

maxmag-soft avatar Sep 14 '22 02:09 maxmag-soft

Updates?

aolko avatar Jan 20 '23 21:01 aolko

+1

ThBastos avatar May 02 '23 12:05 ThBastos

+1

andreapola avatar May 15 '23 15:05 andreapola

+1

alexkuzmin avatar Jun 28 '23 14:06 alexkuzmin

If anyone is interested, I managed to implement a simple interface that will add the audio tracks to settings. I used @Ponywka 's PR and added support for basic HTML5 video. The changing track itself in settings does not change media that is played (until you are not using DASH) but you are able to add onChange function as with quality and implement changing media track yourself (for example with HLS.js).

Available as npm i @antik-web/plyr

All you need to do is add these to plyr's config:

new Plyr(videoHtmlElement, {
    audioTrack: {
        options: ['sk', 'en', 'us'] // array of strings,
        selected: 'sk',
        onChange: (e: any) => updateAudio(e), // e is value of the selected label (string)
        showUnrecognizedLabel: true, // if you want to show 'Unrecognized (en)' (if not defined in i18n) instead of 'en'
    },
    i18n: {
        'audioTrack': 'Language',
        audioTrackLabel: {
            'en': 'English'
        }
    }
});

frankykubo avatar Aug 03 '23 09:08 frankykubo

@frankykubo Can you provide me the script please? I'm not familiar with npm or node.js. I'm using plyr in html only. So I need the script file. Thanks in Advance!

flixadmin avatar Mar 18 '24 07:03 flixadmin

@frankykubo Can you provide me the script please? I'm not familiar with npm or node.js. I'm using plyr in html only. So I need the script file. Thanks in Advance!

You can download artifacts HERE. I tested it only in Vue using JS, but I hope you can make it work your way too! Good lock.

frankykubo avatar Mar 18 '24 22:03 frankykubo

@frankykubo Is'nt The Provided Release is same as the Your Modified repo? Maybe I didn't make it clear. I want something like: <script src="https://cdn.plyr.io/3.7.8/plyr.polyfilled.js"></script> This. The Plyr.Plyfilled.js file which can be directly run in browser.

flixadmin avatar Mar 19 '24 08:03 flixadmin

@flixadmin I don't have it on any CDN. You have to download build-artifacts.zip and then open the ZIP, get the file you need (in your case plyr.polyfilled.js and store it on your web's. Then, you can use it as <script src="your-web-location/plyr.polyfilled.js"></script>.

frankykubo avatar Mar 19 '24 09:03 frankykubo

Thanks a lot! I found it. I'm putting a like to the file here for anyone who needs it: https://gist.github.com/flixadmin/8052ef992a44543596129886a89dbe9a

flixadmin avatar Mar 20 '24 06:03 flixadmin

@flixadmin GitHub Pages may be better

Ponywka avatar Mar 20 '24 08:03 Ponywka