Skip to content

Commit

Permalink
chore(demo): clear type on manual source change (#1030)
Browse files Browse the repository at this point in the history
If a user manually changes the url, the type may not be correct anymore.
We should clear it. Given that we auto-detect .m3u8 and .mpd types, it
shouldn't be a big deal and would cause less problems than the incorrect
type being present for the given source.
  • Loading branch information
gkatsev authored Dec 8, 2020
1 parent c4f7d1d commit d39276d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/index-demo-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@
urlButton.click();
}
});
stateEls.url.addEventListener('input', function(event) {
if (stateEls.type.value.length) {
stateEls.type.value = '';
}
});
stateEls.type.addEventListener('keyup', function(event) {
if (event.key === 'Enter') {
urlButton.click();
Expand Down

0 comments on commit d39276d

Please sign in to comment.