Alternative media presentation/skipAfter with seekDisable flag implementation#108
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a seekDisabled flag to prevent seeking operations. The implementation is straightforward, adding checks in the seek() and _onPlaybackSeeking() methods and exposing the functionality through the MediaPlayer API. I've identified a potential issue with state management during player reset and some missing documentation that should be addressed to improve maintainability.
| playbackStalled, | ||
| manifestUpdateInProgress, | ||
| initialCatchupModeActivated, | ||
| seekDisabled, |
There was a problem hiding this comment.
| function setSeekDisabled(value){ | ||
| playbackController.setSeekDisabled(value) | ||
| } |
There was a problem hiding this comment.
This new function is missing JSDoc documentation. Adding documentation improves code clarity and maintainability for future developers. Also, for consistency with the project's coding style, please add a semicolon at the end of the statement.
/**
* Use this method to disable seeking. When disabled, any calls to seek() will be ignored.
* @param {boolean} value - A boolean to enable/disable seeking.
* @memberof module:MediaPlayer
* @instance
*/
function setSeekDisabled(value) {
playbackController.setSeekDisabled(value);
}| function setSeekDisabled(value){ | ||
| seekDisabled = value; | ||
| } |
There was a problem hiding this comment.
Please add JSDoc documentation for the new setSeekDisabled function to explain its purpose and parameters. This will help with code maintainability.
/**
* Sets the seek disabled state. If true, seeking is disabled.
* @param {boolean} value
*/
function setSeekDisabled(value) {
seekDisabled = value;
}
No description provided.