3
4 RUN(internals.settings.setShouldDisplayTrackKind('Captions', false))
5 RUN(internals.settings.setShouldDisplayTrackKind('Subtitles', true))
6
7 EVENT(canplaythrough)
8
9 Test 1: 'ru' track selected because mode is automatic and no audio track is available in user language
10 RUN(internals.setCaptionDisplayMode('Automatic'))
11 RUN(internals.setPrimaryAudioTrackLanguageOverride('fr'))
12 RUN(internals.setUserPreferredLanguages(['ru']))
13 - creating tracks for: [en,ru,en-au,jp].
14
15 EVENT(load)
16 EXPECTED (event.target.srclang == 'ru') OK
17 EXPECTED (event.target.readyState == '2') OK
18
19 Test 2: no track selected because none matches user language
20 RUN(internals.setUserPreferredLanguages(['se']))
21 - creating tracks for: [en,ru,en-au,jp].
22 EXPECTED (video.textTracks[0].mode == 'disabled') OK
23 EXPECTED (video.textTracks[1].mode == 'disabled') OK
24 EXPECTED (video.textTracks[2].mode == 'disabled') OK
25 EXPECTED (video.textTracks[3].mode == 'disabled') OK
26
27 END OF TEST
28