Skip to content

allow setInitialMediaSettingsFor with fragmentedText media type

Created by: jeffcunat

This PR will make setInitialMediaSettingsFor compatible with fragmentedText (like it is done with audio and video)

For example :

 player.setInitialMediaSettingsFor('fragmentedText', { 
                lang: 'en',
                role: 'caption'
            });

This is useful to initialize the player for users that want to activate closed captions by default if they are present.

We are using the mediaController.matchSettings method inside the TextController to reuse the same mechanism than for audio and video.

We can keep the setTextDefaultLanguage method for backward compatibility but player.setInitialMediaSettingsFor('fragmentedText', { lang: 'en' }); is equivalent to player.setTextDefaultLanguage('en')

Merge request reports