Making sure only one subtitle track is showing at any given time.
Chrome has some heuristic that forces all tracks on the main stream
(and only there) to be visible at once if any track is set to be
visible when the page loads. Moving recall of settings into an
eventListener firing on canplay on the main stream solves the issue.
Also simplified URL parameter handling to no longer encode a second
level of options. Multiple players on the same page will be dealt with
if it happens.
Keyboard events were triggering regardless of which element had focus, which
led to surprising behaviour: if the play button was focused and spacebar
got pressed, two playback toggle actions were triggered - one from the
keyboard listener and one from the default button activation.
This is fixed by ignoring spacebar presses in the custom listener if a
button has focus.
Also minor stylistic change break -> return
This change should lead to the screen automatically getting set to landscape
mode when activating fullscreen on a mobile device. Seems to only work in
chrome, which is not great, but it seems to be the only option.
Due to source.muted not being set in the volume slider listener, it was
possible to desync the mute icon state by lowering the volume to zero and then
clicking the mute button.
The mute button no longer mutes when used on a touch device. Instead, it only
causes the volume slider to be displayed so the user can set the desired
volume. Also updated the volume icon to show as muted if the volume is
set to zero.
No longer using the entire window for layout decisions has caused a number of
problems. Attempting to solve them by porting some of the layout logic from
the old player. Also shuffled the CSS a bit to make related things
be displayed together.
Remote sources (those starting with https?://) now get a random subdomain
prepended by default. This can be switched off by setting the 'nomunge'
attribute on the player element to a truthy value.