Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(media): Fix region checking in livestreams #5361

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

theodab
Copy link
Contributor

@theodab theodab commented Jun 27, 2023

In some cases, in a livestream situation, the region observer's poll method ends up being called before the media time is set to the live edge. This does not happen every time; it's likely based on the exact time it takes the player to start playing. When this does happen, it leads to the region observer "skipping" over every region between time=0 and the live head, as it erroneously believes that it has actually played through all of that time. This could result in confusion for applications that are relying on region data.

This change modifiers the region observer so that it does not start examining regions until the time gets past 0 seconds, except in the case of VOD.

Closes #5213

In some cases, in a livestream situation, the region observer's
poll method ends up being called before the media time is set to
the live edge. This does not happen every time; it's likely based
on the exact time it takes the player to start playing.
When this does happen, it leads to the region observer "skipping"
over every region between time=0 and the live head, as it erroneously
believes that it has actually played through all of that time.
This could result in confusion for applications that are relying on
region data.

This change modifiers the region observer so that it does not start
examining regions until the time gets past 0 seconds, except in the case
of VOD.

Closes shaka-project#5213
@theodab theodab added type: bug Something isn't working correctly component: DASH The issue involves the MPEG DASH manifest format labels Jun 27, 2023
@avelad avelad added this to the v4.4 milestone Jun 27, 2023
@avelad avelad added the priority: P2 Smaller impact or easy workaround label Jun 27, 2023
@avelad avelad requested review from joeyparrish and avelad June 27, 2023 10:26
@github-actions
Copy link
Contributor

Incremental code coverage: 92.31%

Copy link
Member

@joeyparrish joeyparrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise

lib/media/region_observer.js Outdated Show resolved Hide resolved
@theodab theodab merged commit 9fffcb9 into shaka-project:main Jun 28, 2023
@theodab theodab deleted the regionBranch branch June 28, 2023 10:52
joeyparrish pushed a commit that referenced this pull request Jul 20, 2023
In some cases, in a livestream situation, the region observer's poll method ends up being called before the media time is set to the live edge. This does not happen every time; it's likely based on the exact time it takes the player to start playing. When this does happen, it leads to the region observer "skipping" over every region between time=0 and the live head, as it erroneously believes that it has actually played through all of that time. This could result in confusion for applications that are relying on region data.

This change modifiers the region observer so that it does not start examining regions until the time gets past 0 seconds, except in the case of VOD.

Closes #5213
joeyparrish pushed a commit that referenced this pull request Jul 20, 2023
In some cases, in a livestream situation, the region observer's poll method ends up being called before the media time is set to the live edge. This does not happen every time; it's likely based on the exact time it takes the player to start playing. When this does happen, it leads to the region observer "skipping" over every region between time=0 and the live head, as it erroneously believes that it has actually played through all of that time. This could result in confusion for applications that are relying on region data.

This change modifiers the region observer so that it does not start examining regions until the time gets past 0 seconds, except in the case of VOD.

Backported to v4.2.x

Closes #5213
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Aug 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timed metadata are raised all at once when loading a Live DASH DAI stream in a middle of an ad break (4.3.6)
3 participants