Skip to content

Commit

Permalink
fix:accept CurrentPlayheadPosition with 0 value
Browse files Browse the repository at this point in the history
  • Loading branch information
mmustafa-tse committed Sep 11, 2024
1 parent c280473 commit 5261bb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ export class MediaSession {
options: Options = {},
): MediaEvent {
// Set event option based on options or current state
if (options?.currentPlayheadPosition !== undefined) {
this.currentPlayheadPosition = options?.currentPlayheadPosition;
}
this.currentPlayheadPosition =
options?.currentPlayheadPosition ?? this.currentPlayheadPosition;

// Merge Session Attributes with any other optional Event Attributes.
// Event-Level Custom Attributes will override Session Custom Attributes if there is a collison.
Expand Down

0 comments on commit 5261bb7

Please sign in to comment.