| Tests "Automatic" mode track selection. |
| |
| |
| RUN(internals.settings.setShouldDisplayTrackKind('Captions', false)) |
| RUN(internals.settings.setShouldDisplayTrackKind('Subtitles', true)) |
| |
| EVENT(canplaythrough) |
| |
| Test 1: 'ru' track selected because mode is automatic and no audio track is available in user language |
| RUN(internals.setCaptionDisplayMode('Automatic')) |
| RUN(internals.setPrimaryAudioTrackLanguageOverride('fr')) |
| RUN(internals.setUserPreferredLanguages(['ru'])) |
| - creating tracks for: [en,ru,en-au,jp]. |
| |
| EVENT(load) |
| EXPECTED (event.target.srclang == 'ru') OK |
| EXPECTED (event.target.readyState == '2') OK |
| |
| Test 2: no track selected because none matches user language |
| RUN(internals.setUserPreferredLanguages(['se'])) |
| - creating tracks for: [en,ru,en-au,jp]. |
| EXPECTED (video.textTracks[0].mode == 'disabled') OK |
| EXPECTED (video.textTracks[1].mode == 'disabled') OK |
| EXPECTED (video.textTracks[2].mode == 'disabled') OK |
| EXPECTED (video.textTracks[3].mode == 'disabled') OK |
| |
| END OF TEST |
| |