Skip to content

Commit

Permalink
add logs to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent-Bouisset committed Jul 23, 2024
1 parent 6138922 commit fcfdd77
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main_thread/init/media_source_content_initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
} else {
wantedSeekingTime = currentTime + relativeResumingPosition;
}
console.log("DEBUG TEST CI X: seeking in needsBufferFlush ", wantedSeekingTime);

Check failure on line 796 in src/main_thread/init/media_source_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement
playbackObserver.setCurrentTime(wantedSeekingTime);

// Seek again once data begins to be buffered.
Expand All @@ -818,6 +819,10 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
obs.position.getPolled() > wantedSeekingTime + 0.1
) {
stopListening();
console.log(

Check failure on line 822 in src/main_thread/init/media_source_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement
"DEBUG TEST CI X: seeking in needsBufferFlush listen ",
obs.position.getWanted() + 0.001,
);
playbackObserver.setCurrentTime(obs.position.getWanted() + 0.001);
}
},
Expand Down Expand Up @@ -942,8 +947,15 @@ export default class MediaSourceContentInitializer extends ContentInitializer {
// simple seek close to the current position
// to flush the buffers
if (position + 0.001 < lastObservation.duration) {
console.log(

Check failure on line 950 in src/main_thread/init/media_source_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement
"DEBUG TEST CI X: seeking in decipherability ",
mediaElement.currentTime + 0.001,
);

playbackObserver.setCurrentTime(mediaElement.currentTime + 0.001);
} else {
console.log("DEBUG TEST CI X: seeking in decipherability 2 ", position);

Check failure on line 957 in src/main_thread/init/media_source_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement

playbackObserver.setCurrentTime(position);
}
}
Expand Down
11 changes: 11 additions & 0 deletions src/main_thread/init/multi_thread_content_initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ export default class MultiThreadContentInitializer extends ContentInitializer {
} else {
wantedSeekingTime = currentTime + relativeResumingPosition;
}
console.log(

Check failure on line 623 in src/main_thread/init/multi_thread_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement
"DEBUG TEST CI X: seeking in needbufferflush msg ",
wantedSeekingTime,
);
playbackObserver.setCurrentTime(wantedSeekingTime);
break;
}
Expand Down Expand Up @@ -1031,8 +1035,15 @@ export default class MultiThreadContentInitializer extends ContentInitializer {
// simple seek close to the current position
// to flush the buffers
if (currentPosition + 0.001 < lastObservation.duration) {
console.log(

Check failure on line 1038 in src/main_thread/init/multi_thread_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement
"DEBUG TEST CI X: seeking in AA ",
mediaElement.currentTime + 0.001,
);

playbackObserver.setCurrentTime(mediaElement.currentTime + 0.001);
} else {
console.log("DEBUG TEST CI X: seeking in AB ", currentPosition);

Check failure on line 1045 in src/main_thread/init/multi_thread_content_initializer.ts

View workflow job for this annotation

GitHub Actions / typechecking_and_linting (20.x)

Unexpected console statement

playbackObserver.setCurrentTime(currentPosition);
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/main_thread/init/utils/rebuffering_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
now - referenceTimestamp > UNFREEZING_SEEK_DELAY
) {
log.warn("Init: trying to seek to un-freeze player");
console.log(
"DEBUG TEST CI X: seeking in DA ",
this._playbackObserver.getCurrentTime() + UNFREEZING_DELTA_POSITION,
);

this._playbackObserver.setCurrentTime(
this._playbackObserver.getCurrentTime() + UNFREEZING_DELTA_POSITION,
);
Expand Down Expand Up @@ -211,6 +216,7 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
position.getPolled(),
realSeekTime,
);
console.log("DEBUG TEST CI X: seeking in DB ", realSeekTime);
this._playbackObserver.setCurrentTime(realSeekTime);
this.trigger(
"warning",
Expand Down Expand Up @@ -246,6 +252,8 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
seekTo,
BUFFER_DISCONTINUITY_THRESHOLD,
);
console.log("DEBUG TEST CI X: seeking in DC ", seekTo);

this._playbackObserver.setCurrentTime(seekTo);
this.trigger(
"warning",
Expand All @@ -266,6 +274,8 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
this._playbackObserver.getCurrentTime()
) {
const nextPeriod = this._manifest.periods[i + 1];
console.log("DEBUG TEST CI X: seeking in DD ", nextPeriod.start);

this._playbackObserver.setCurrentTime(nextPeriod.start);
this.trigger(
"warning",
Expand Down Expand Up @@ -329,6 +339,8 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
"Init: rebuffering because of a future locked stream.\n" +
"Trying to unlock by seeking to the next Period",
);
console.log("DEBUG TEST CI X: seeking in DE ", lockedPeriodStart + 0.001);

this._playbackObserver.setCurrentTime(lockedPeriodStart + 0.001);
}
}
Expand Down

0 comments on commit fcfdd77

Please sign in to comment.