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: Fix vanishing tracks while offline #4426

Merged

Conversation

joeyparrish
Copy link
Member

Introduced in #4189, as a side-effect of restricting tracks when a
network failure occurs. We should not trigger such restrictions when
the browser is known to be offline.

Closes #4408

Introduced in shaka-project#4189, as a side-effect of restricting tracks when a
network failure occurs.  We should not trigger such restrictions when
the browser is known to be offline.

Closes shaka-project#4408
@@ -422,7 +422,6 @@ describe('Player', () => {
dispatchEventSpy.calls.reset();
player.configure({streaming: {maxDisabledTime}});
player.setMaxHardwareResolution(123, 456);
onErrorCallback(httpError);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to make sure I understand, was this line moved to the it() level since there's now a nested describe() scenario that also needs to call onErrorCallback(httpError) at the appropriate time in the jasmine test life cycle?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. The original author of these tests put onErrorCallback() in beforeEach(). But since that is the thing which triggers the code under test, it really belongs in the test itself. The rest can still be considered test setup.

This only became an issue when I wanted to nest another level with different setup. All setup needs to happen before the code under test is triggered.

@github-actions
Copy link
Contributor

Incremental code coverage: 100.00%

@joeyparrish joeyparrish merged commit c935cc1 into shaka-project:main Aug 18, 2022
@joeyparrish joeyparrish deleted the fix-offline-restricted-tracks branch August 18, 2022 21:47
avelad pushed a commit that referenced this pull request Aug 31, 2022
Introduced in #4189, as a side-effect of restricting tracks when a
network failure occurs.  We should not trigger such restrictions when
the browser is known to be offline.

Closes #4408
avelad pushed a commit that referenced this pull request Aug 31, 2022
Introduced in #4189, as a side-effect of restricting tracks when a
network failure occurs.  We should not trigger such restrictions when
the browser is known to be offline.

Closes #4408
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolution disappear if network intermittent
3 participants