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

improvements on (audio) track selection #4707

Open
wants to merge 8 commits into
base: development
Choose a base branch
from

Conversation

stschr
Copy link
Contributor

@stschr stschr commented Feb 28, 2025

this improves track selection as discussed here: #4701

@stschr stschr requested a review from dsilhavy February 28, 2025 15:42
@dsilhavy dsilhavy added this to the 5.0.1 milestone Mar 4, 2025
@@ -998,14 +998,11 @@ import Events from './events/Events.js';
* - Constants.TRACK_SWITCH_MODE_NEVER_REPLACE
* Do not replace existing segments in the buffer
*
* @property {string} [selectionModeForInitialTrack="highestSelectionPriority"]
* @property {string} [selectionModeForInitialTrack="highestEfficiency"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we keep highestSelectionPriority as an option here. I would still like to give applications the chance to ignore selectionPriority if required. With the changes here and below we always use selectionPriority regardless of the configured mode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done - see the newly introduced ignoreSelectionPriority flag

result.push(track);
}
});
if ( trackArr[0] && (trackArr[0].type === Constants.VIDEO) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please split this logic into two separate functions one for audio and one for video which are then called here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

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