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

chore(demo): add a representations selector to the demo page #901

Merged
merged 1 commit into from
Jul 13, 2020

Conversation

brandonocasey
Copy link
Contributor

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.

@@ -277,10 +327,15 @@
} else {
sources.dispatchEvent(newEvent('change'));
}
player.on('loadedmetadata', () => {
player.on('loadedmetadata', function() {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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;
Copy link
Contributor Author

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.

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2020

slowly we're adding stats page features

@brandonocasey
Copy link
Contributor Author

haha yep

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.

seems good to me. Though, with Bipbop Mux it isn't really downswitching for me but likely a separate issue from the representations selector.

@brandonocasey brandonocasey merged commit 0a54ae2 into main Jul 13, 2020
@gkatsev gkatsev deleted the chore/add-reps-to-demo branch May 17, 2021 21:44
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