-
Notifications
You must be signed in to change notification settings - Fork 424
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
chore(demo): add a representations selector to the demo page #901
Conversation
@@ -277,10 +327,15 @@ | |||
} else { | |||
sources.dispatchEvent(newEvent('change')); | |||
} | |||
player.on('loadedmetadata', () => { | |||
player.on('loadedmetadata', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can guess, ie 11 didn't like this
@@ -165,6 +185,36 @@ | |||
onload(); | |||
}; | |||
|
|||
var regenerateRepresentations = function() { | |||
while (representationsEl.firstChild) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As things are blacklisted representations can be removed/added.
representationsEl.appendChild(option); | ||
}); | ||
|
||
representationsEl.selectedIndex = selectedIndex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not trigger a change
event on representationsEl
as that only happens when not using the js api.
slowly we're adding stats page features |
haha yep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems good to me. Though, with Bipbop Mux it isn't really downswitching for me but likely a separate issue from the representations selector.
Description
While looking into issues related to codec switching and representation/playlist changes I implemented local changes to select representations using the demo ui. I think this would benefit all of us, so I cleaned it up and wrapped it into a pull request.