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 AudioStreamController when media is not attached #2172

Merged

Conversation

mad-gooze
Copy link
Contributor

@mad-gooze mad-gooze commented Mar 12, 2019

This PR will...

Fix AudioStreamController for streams with subtitles if media is not attached

Why is this Pull Request needed?

Fixes audioSwitch and logging in AudioStreamController

Reproduce example:

<video id="video" controls></video>
<button onclick="attach()">Attach media</button>

<script>
  var video = document.getElementById('video');
  var hls = new Hls({
    startFragPrefetch: true,
    debug: true,
  });
  // attach();
  hls.loadSource('https://faked-multiple-audio-tracks-qdyvgxaayi.now.sh/index.m3u8');
  hls.startLoad();

  function attach () {
    hls.attachMedia(video);
  }
</script>

on master branch stream will not play after attach

Are there any points in the code the reviewer needs to double check?

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@johnBartos johnBartos added this to the 0.13.0 milestone Apr 10, 2019
@johnBartos johnBartos added the Bug label Apr 10, 2019
@johnBartos
Copy link
Collaborator

Good find 👍

@johnBartos johnBartos merged commit fee971c into video-dev:master Apr 10, 2019
@mad-gooze mad-gooze deleted the audio-stream-contoller-no-media branch April 10, 2019 18:18
realeyes-matthew pushed a commit to realeyes-matthew/hls.js that referenced this pull request Apr 24, 2019
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139648 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139573 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139456 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139292 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556138720 -0600

Update Karma to 3.1.4 for karma-runner/karma@bb022a7 for our single import preprocess.

Widevine EME changes

Use _generateRequestWithPreferredKeySession in _onNewMediaKeySession

Ensure Widevine XHR is open before sending

Complete video playback for Widevine EME, begin work on audio

Reconfigure EME controller to be promise-based

Reset without master merge

Release sessions on restart

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Don't fill the buffer until EME is configured

Configure EME controller to use promise to request license

Remove eme blocking in Buffer Controller

Add separate events for EME configuration

Block frag processing until eme is configured

Fix bug where keysSet was being emitted repeatedly

separate cc bytes into fields, update cea608parser to 1.0.1

updated docs for closed captions note

set track mode to disabled, fix line sticking after seek

set object props to null instead of using 'delete'

use instream id from manifest to determine cc output filter

Don't attempt to unset mediakeys on the media on destroy if the media is non-HTTPS

Clean up EME controller with comments, update config for EME method revisions, fix typos

Remove dist to reset to master build

Change getEMELicenseFunc so the user can load licenses specific to the level or audioTrack

Update API docs for EME

Revert package-lock changes

Revert Karma changes

Make EME controller optional

Fixing diffs

add netlify badge to readme (video-dev#2214)

so that we qualify for the open source plan

https://www.netlify.com/legal/open-source-policy/

fix AudioStreamController when media is not attached (video-dev#2172)

Bump stale time to close from 7 days to 60, add more exempt labels

use netlify endpoint that includes team

so that the sites are created under the new team that has the open source account policy

https://open-api.netlify.com/#/default/createSiteInTeam

Update design.md

This fixes some inconsistencies I noticed while going through this file today

id3 TXXX parsing should use exitOnNull (video-dev#2217)

Enable null delimiter parsing on TXXX labels, per http://id3.org/id3v2.4.0-frames section 4.2.6
This is achieved by passing true to the already existing existOnNull parameter of utf8ArrayToStr(array, exitOnNull = false) if a TXXX field is detected.

per http://id3.org/id3v2.4.0-frames

fix for video-dev#2215

fix video-dev#2157 WEBVTT without X-TIMESTAMP-MAP (video-dev#2179)

Avoid offsetting cue times with localTime if EXT-X-TIMESTAMP-MAP is not present
realeyes-matthew pushed a commit to realeyes-matthew/hls.js that referenced this pull request Apr 24, 2019
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139648 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139573 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139456 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139292 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556138720 -0600

Update Karma to 3.1.4 for karma-runner/karma@bb022a7 for our single import preprocess.

Widevine EME changes

Use _generateRequestWithPreferredKeySession in _onNewMediaKeySession

Ensure Widevine XHR is open before sending

Complete video playback for Widevine EME, begin work on audio

Reconfigure EME controller to be promise-based

Reset without master merge

Release sessions on restart

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Don't fill the buffer until EME is configured

Configure EME controller to use promise to request license

Remove eme blocking in Buffer Controller

Add separate events for EME configuration

Block frag processing until eme is configured

Fix bug where keysSet was being emitted repeatedly

separate cc bytes into fields, update cea608parser to 1.0.1

updated docs for closed captions note

set track mode to disabled, fix line sticking after seek

set object props to null instead of using 'delete'

use instream id from manifest to determine cc output filter

Don't attempt to unset mediakeys on the media on destroy if the media is non-HTTPS

Clean up EME controller with comments, update config for EME method revisions, fix typos

Remove dist to reset to master build

Change getEMELicenseFunc so the user can load licenses specific to the level or audioTrack

Update API docs for EME

Revert package-lock changes

Revert Karma changes

Make EME controller optional

Fixing diffs

add netlify badge to readme (video-dev#2214)

so that we qualify for the open source plan

https://www.netlify.com/legal/open-source-policy/

fix AudioStreamController when media is not attached (video-dev#2172)

Bump stale time to close from 7 days to 60, add more exempt labels

use netlify endpoint that includes team

so that the sites are created under the new team that has the open source account policy

https://open-api.netlify.com/#/default/createSiteInTeam

Update design.md

This fixes some inconsistencies I noticed while going through this file today

id3 TXXX parsing should use exitOnNull (video-dev#2217)

Enable null delimiter parsing on TXXX labels, per http://id3.org/id3v2.4.0-frames section 4.2.6
This is achieved by passing true to the already existing existOnNull parameter of utf8ArrayToStr(array, exitOnNull = false) if a TXXX field is detected.

per http://id3.org/id3v2.4.0-frames

fix for video-dev#2215

fix video-dev#2157 WEBVTT without X-TIMESTAMP-MAP (video-dev#2179)

Avoid offsetting cue times with localTime if EXT-X-TIMESTAMP-MAP is not present

Re-remove non-EME code to align with master

Forgot newline in timeline-controller revert to master

Another newline

Another newline

Spacing issue

Another newline

Another newline

Another newline

Another newline
realeyes-matthew pushed a commit to realeyes-matthew/hls.js that referenced this pull request Apr 24, 2019
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139648 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139573 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139456 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139292 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556138720 -0600

Update Karma to 3.1.4 for karma-runner/karma@bb022a7 for our single import preprocess.

Widevine EME changes

Use _generateRequestWithPreferredKeySession in _onNewMediaKeySession

Ensure Widevine XHR is open before sending

Complete video playback for Widevine EME, begin work on audio

Reconfigure EME controller to be promise-based

Reset without master merge

Release sessions on restart

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Don't fill the buffer until EME is configured

Configure EME controller to use promise to request license

Remove eme blocking in Buffer Controller

Add separate events for EME configuration

Block frag processing until eme is configured

Fix bug where keysSet was being emitted repeatedly

separate cc bytes into fields, update cea608parser to 1.0.1

updated docs for closed captions note

set track mode to disabled, fix line sticking after seek

set object props to null instead of using 'delete'

use instream id from manifest to determine cc output filter

Don't attempt to unset mediakeys on the media on destroy if the media is non-HTTPS

Clean up EME controller with comments, update config for EME method revisions, fix typos

Remove dist to reset to master build

Change getEMELicenseFunc so the user can load licenses specific to the level or audioTrack

Update API docs for EME

Revert package-lock changes

Revert Karma changes

Make EME controller optional

Fixing diffs

add netlify badge to readme (video-dev#2214)

so that we qualify for the open source plan

https://www.netlify.com/legal/open-source-policy/

fix AudioStreamController when media is not attached (video-dev#2172)

Bump stale time to close from 7 days to 60, add more exempt labels

use netlify endpoint that includes team

so that the sites are created under the new team that has the open source account policy

https://open-api.netlify.com/#/default/createSiteInTeam

Update design.md

This fixes some inconsistencies I noticed while going through this file today

id3 TXXX parsing should use exitOnNull (video-dev#2217)

Enable null delimiter parsing on TXXX labels, per http://id3.org/id3v2.4.0-frames section 4.2.6
This is achieved by passing true to the already existing existOnNull parameter of utf8ArrayToStr(array, exitOnNull = false) if a TXXX field is detected.

per http://id3.org/id3v2.4.0-frames

fix for video-dev#2215

fix video-dev#2157 WEBVTT without X-TIMESTAMP-MAP (video-dev#2179)

Avoid offsetting cue times with localTime if EXT-X-TIMESTAMP-MAP is not present

Re-remove non-EME code to align with master

Forgot newline in timeline-controller revert to master

Another newline

Another newline

Spacing issue

Another newline

Another newline

Another newline

Another newline
realeyes-matthew pushed a commit to realeyes-matthew/hls.js that referenced this pull request Apr 25, 2019
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139648 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139573 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139456 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139292 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556138720 -0600

Update Karma to 3.1.4 for karma-runner/karma@bb022a7 for our single import preprocess.

Widevine EME changes

Use _generateRequestWithPreferredKeySession in _onNewMediaKeySession

Ensure Widevine XHR is open before sending

Complete video playback for Widevine EME, begin work on audio

Reconfigure EME controller to be promise-based

Reset without master merge

Release sessions on restart

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Don't fill the buffer until EME is configured

Configure EME controller to use promise to request license

Remove eme blocking in Buffer Controller

Add separate events for EME configuration

Block frag processing until eme is configured

Fix bug where keysSet was being emitted repeatedly

separate cc bytes into fields, update cea608parser to 1.0.1

updated docs for closed captions note

set track mode to disabled, fix line sticking after seek

set object props to null instead of using 'delete'

use instream id from manifest to determine cc output filter

Don't attempt to unset mediakeys on the media on destroy if the media is non-HTTPS

Clean up EME controller with comments, update config for EME method revisions, fix typos

Remove dist to reset to master build

Change getEMELicenseFunc so the user can load licenses specific to the level or audioTrack

Update API docs for EME

Revert package-lock changes

Revert Karma changes

Make EME controller optional

Fixing diffs

add netlify badge to readme (video-dev#2214)

so that we qualify for the open source plan

https://www.netlify.com/legal/open-source-policy/

fix AudioStreamController when media is not attached (video-dev#2172)

Bump stale time to close from 7 days to 60, add more exempt labels

use netlify endpoint that includes team

so that the sites are created under the new team that has the open source account policy

https://open-api.netlify.com/#/default/createSiteInTeam

Update design.md

This fixes some inconsistencies I noticed while going through this file today

id3 TXXX parsing should use exitOnNull (video-dev#2217)

Enable null delimiter parsing on TXXX labels, per http://id3.org/id3v2.4.0-frames section 4.2.6
This is achieved by passing true to the already existing existOnNull parameter of utf8ArrayToStr(array, exitOnNull = false) if a TXXX field is detected.

per http://id3.org/id3v2.4.0-frames

fix for video-dev#2215

fix video-dev#2157 WEBVTT without X-TIMESTAMP-MAP (video-dev#2179)

Avoid offsetting cue times with localTime if EXT-X-TIMESTAMP-MAP is not present

Re-remove non-EME code to align with master

Forgot newline in timeline-controller revert to master

Another newline

Another newline

Spacing issue

Another newline

Another newline

Another newline

Another newline

Fix linting errors

Update EME errors

Fix error comment
realeyes-matthew pushed a commit to realeyes-matthew/hls.js that referenced this pull request Apr 26, 2019
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139648 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139573 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139456 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556139292 -0600

parent 10f1737
author Jamie Stackhouse <contin673@gmail.com> 1551472707 -0400
committer Matthew Thompson <matthew@realeyes.com> 1556138720 -0600

Update Karma to 3.1.4 for karma-runner/karma@bb022a7 for our single import preprocess.

Widevine EME changes

Use _generateRequestWithPreferredKeySession in _onNewMediaKeySession

Ensure Widevine XHR is open before sending

Complete video playback for Widevine EME, begin work on audio

Reconfigure EME controller to be promise-based

Reset without master merge

Release sessions on restart

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Merge branch 'widevine-eme' of github.com:realeyes-matthew/hls.js into widevine-eme

Don't fill the buffer until EME is configured

Configure EME controller to use promise to request license

Remove eme blocking in Buffer Controller

Add separate events for EME configuration

Block frag processing until eme is configured

Fix bug where keysSet was being emitted repeatedly

separate cc bytes into fields, update cea608parser to 1.0.1

updated docs for closed captions note

set track mode to disabled, fix line sticking after seek

set object props to null instead of using 'delete'

use instream id from manifest to determine cc output filter

Don't attempt to unset mediakeys on the media on destroy if the media is non-HTTPS

Clean up EME controller with comments, update config for EME method revisions, fix typos

Remove dist to reset to master build

Change getEMELicenseFunc so the user can load licenses specific to the level or audioTrack

Update API docs for EME

Revert package-lock changes

Revert Karma changes

Make EME controller optional

Fixing diffs

add netlify badge to readme (video-dev#2214)

so that we qualify for the open source plan

https://www.netlify.com/legal/open-source-policy/

fix AudioStreamController when media is not attached (video-dev#2172)

Bump stale time to close from 7 days to 60, add more exempt labels

use netlify endpoint that includes team

so that the sites are created under the new team that has the open source account policy

https://open-api.netlify.com/#/default/createSiteInTeam

Update design.md

This fixes some inconsistencies I noticed while going through this file today

id3 TXXX parsing should use exitOnNull (video-dev#2217)

Enable null delimiter parsing on TXXX labels, per http://id3.org/id3v2.4.0-frames section 4.2.6
This is achieved by passing true to the already existing existOnNull parameter of utf8ArrayToStr(array, exitOnNull = false) if a TXXX field is detected.

per http://id3.org/id3v2.4.0-frames

fix for video-dev#2215

fix video-dev#2157 WEBVTT without X-TIMESTAMP-MAP (video-dev#2179)

Avoid offsetting cue times with localTime if EXT-X-TIMESTAMP-MAP is not present

Re-remove non-EME code to align with master

Forgot newline in timeline-controller revert to master

Another newline

Another newline

Spacing issue

Another newline

Another newline

Another newline

Another newline

Fix linting errors

Update EME errors

Fix error comment

Fix EME to listen for encrypted event

Update demo for EME changes

Cleanup non-EME code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants