-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #406 from bitmovin/feature/support-cue-enter-and-e…
…xit-events Support `CueEnter` and `CueExit` events
- Loading branch information
Showing
16 changed files
with
163 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { TestScope } from 'cavy'; | ||
import { | ||
callPlayer, | ||
callPlayerAndExpectEvent, | ||
EventSequence, | ||
EventType, | ||
expectEvents, | ||
loadSourceConfig, | ||
startPlayerTest, | ||
} from '../playertesting'; | ||
import { Sources } from './helper/Sources'; | ||
|
||
export default (spec: TestScope) => { | ||
spec.describe('playing captions', () => { | ||
spec.it('emits CueEnter and CueExit events', async () => { | ||
await startPlayerTest({}, async () => { | ||
await loadSourceConfig(Sources.sintel); | ||
await callPlayer(async (player) => { | ||
const subtitleTrack = (await player.getAvailableSubtitles())[1]; | ||
player.setSubtitleTrack(subtitleTrack.identifier); | ||
player.play(); | ||
}); | ||
await callPlayerAndExpectEvent((player) => { | ||
player.seek(105); | ||
}, EventType.Seeked); | ||
await expectEvents( | ||
EventSequence( | ||
EventType.CueEnter, | ||
EventType.CueExit, | ||
EventType.CueEnter, | ||
EventType.CueExit, | ||
EventType.CueEnter, | ||
EventType.CueExit | ||
), | ||
30 | ||
); | ||
}); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
import AdvertisingTest from './advertisingTest'; | ||
import CaptionTest from './captionTest'; | ||
import LoadingTest from './loadingTest'; | ||
import PlaybackTest from './playbackTest'; | ||
import UnloadingTest from './unloadingTest'; | ||
|
||
export default [AdvertisingTest, LoadingTest, PlaybackTest, UnloadingTest]; | ||
export default [ | ||
AdvertisingTest, | ||
CaptionTest, | ||
LoadingTest, | ||
PlaybackTest, | ||
UnloadingTest, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters