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: always have an enabled audio track when switching #7163

Merged
merged 2 commits into from
Apr 6, 2021

Conversation

brandonocasey
Copy link
Contributor

Description

Only change enabled on one track, the others will automatically be turned off. This prevents us from getting two AudioTrackList change events where the first will have no tracks enabled, and the second has a track enabled.

@brandonocasey brandonocasey changed the title fix: always have an enable audio track fix: always have an enabled audio track when switching Apr 6, 2021
Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Works on iOS, so, good to go.

@gkatsev gkatsev merged commit 4707ce8 into main Apr 6, 2021
@gkatsev gkatsev deleted the fix/one-track-change branch April 6, 2021 20:22
gkatsev added a commit that referenced this pull request Nov 12, 2021
Audio Tracks are supposed to allow multiple tracks at the same time.
Safari 15 has added, at least partial support for this.

In #7163, we stopped turning other tracks of manually since we already
were doing so in the AudioTrackList. However, this only worked for
non-native AudioTracks. Before Safari 15, Safari automatically turned
off the other tracks for us so things continued to work.

With this change, when native audio tracks are used, we will turn off
the other tracks, partially reverting #7163.

We currently do not have any tests or are set up for writing tests for
these proxy tracks. Adding such tests will take too long for not a lot
of benefit, unfortunately.

Fixes #7494.
gkatsev added a commit that referenced this pull request Nov 16, 2021
Audio Tracks are supposed to allow multiple tracks at the same time.
Safari 15 has added, at least partial support for this.

In #7163, we stopped turning other tracks of manually since we already
were doing so in the AudioTrackList. However, this only worked for
non-native AudioTracks. Before Safari 15, Safari automatically turned
off the other tracks for us so things continued to work.

With this change, when native audio tracks are used, we will turn off
the other tracks, partially reverting #7163.

We currently do not have any tests or are set up for writing tests for
these proxy tracks. Adding such tests will take too long for not a lot
of benefit, unfortunately.

Fixes #7494.
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
edirub pushed a commit to edirub/video.js that referenced this pull request Jun 8, 2023
Audio Tracks are supposed to allow multiple tracks at the same time.
Safari 15 has added, at least partial support for this.

In videojs#7163, we stopped turning other tracks of manually since we already
were doing so in the AudioTrackList. However, this only worked for
non-native AudioTracks. Before Safari 15, Safari automatically turned
off the other tracks for us so things continued to work.

With this change, when native audio tracks are used, we will turn off
the other tracks, partially reverting videojs#7163.

We currently do not have any tests or are set up for writing tests for
these proxy tracks. Adding such tests will take too long for not a lot
of benefit, unfortunately.

Fixes videojs#7494.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants