Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions samples/c2pa/plugin-dash/c2pa-dash-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ async function c2pa_init(player, onPlaybackTimeUpdated) {
currentQuality[e.mediaType] = player.getCurrentTrackFor(e.mediaType).bitrateList[e.newQuality].id;
});

player.on(dashjs.MediaPlayer.events['PLAYBACK_ENDED'], function (e) {
console.log('[C2PA] Playback ended');
verificationTime = 0.0;
player.on(dashjs.MediaPlayer.events['PLAYBACK_SEEKING'], function (e) {
console.log('[C2PA] Streaming seeking');
verificationTime = e.seekTime;
});

player.on(dashjs.MediaPlayer.events['PLAYBACK_TIME_UPDATED'], function (e) {
Expand Down
10 changes: 5 additions & 5 deletions src/streaming/C2pa.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function C2paController(_eventBus, _getCurrentTrackFor) {
instance
);
eventBus.on(
MediaPlayerEvents.PLAYBACK_ENDED,
onPlaybackEnded,
MediaPlayerEvents.PLAYBACK_SEEKING,
onPlaybackSeeking,
instance
);

Expand Down Expand Up @@ -155,9 +155,9 @@ function C2paController(_eventBus, _getCurrentTrackFor) {
).bitrateList[e.newQuality].id;
}

function onPlaybackEnded() {
console.log('[C2PA] Playback ended');
verificationTime = 0.0;
function onPlaybackSeeking(e) {
console.log('[C2PA] Streaming seeking');
verificationTime = e.seekTime;
}

function getC2paVerificationStatus(time, streamInfo) {
Expand Down