Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Do not reset segmentloaders when switching media groups #1155

Merged
merged 3 commits into from
Jun 20, 2017

Conversation

imbcmdth
Copy link
Member

@imbcmdth imbcmdth commented Jun 7, 2017

Description

When switching media-groups we do not need to reset the SegmentLoaders. Doing so causes us to evict all audio (and/or video) data from the source buffers which causes poor user experience when switching renditions that reference different media-groups.

Specific Changes proposed

  • Fixed a bug in SegmentLoader where sometimes abort would leave it in a bad state
  • Fixed a bug in SegmentLoader where dispose would leave the monitor buffer timer running
  • Refactored setupAudio into several functions so that they can be combined into two different work-flows - setupAudio which does a hard-reset of the SegmentLoaders and mediaGroupsChanged which does not

Copy link
Contributor

@gesinger gesinger left a comment

Choose a reason for hiding this comment

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

Would be good to have a test where the audio loader is reset

@@ -295,10 +301,11 @@ QUnit.test('fast quality change resyncs audio segment loader', function(assert)
assert.equal(this.requests.length, 1, 'one request');
masterPlaylistController.fastQualityChange_();
assert.equal(this.requests.length, 2, 'added a request for new media');
assert.equal(resets, 0, 'does not reset the audio segment loader yet');
assert.equal(resyncs, 0, 'does not resyncs the audio segment loader yet');
Copy link
Contributor

Choose a reason for hiding this comment

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

does not resync

masterPlaylistController.fastQualityChange_();
assert.equal(resets, 0, 'does not reset the audio segment loader when media same');
assert.equal(resyncs, 0, 'does not resyncs the audio segment loader when media same');
Copy link
Contributor

Choose a reason for hiding this comment

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

does not resync

@mjneil mjneil merged commit 9897577 into master Jun 20, 2017
@mjneil mjneil removed the tested label Jun 20, 2017
@forbesjo forbesjo deleted the fix-media-groups branch July 13, 2017 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants