Skip to content
Permalink
Browse files

Do not tie media element 'muted' state change to player availability

  • Loading branch information...
ferjm committed Apr 11, 2019
1 parent af242a0 commit 0eb2c1d02ea7fbd868bfefb4674599816450b3a2
Showing with 11 additions and 9 deletions.
  1. +11 −9 components/script/dom/htmlmediaelement.rs
@@ -1611,17 +1611,19 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
if self.muted.get() == value {
return;
}

if let Some(ref player) = *self.player.borrow() {
self.muted.set(value);
let _ = player.set_mute(value);
let window = window_from_node(self);
window
.task_manager()
.media_element_task_source()
.queue_simple_event(self.upcast(), atom!("volumechange"), &window);
if !self.is_allowed_to_play() {
self.internal_pause_steps();
}
}

self.muted.set(value);
let window = window_from_node(self);
window
.task_manager()
.media_element_task_source()
.queue_simple_event(self.upcast(), atom!("volumechange"), &window);
if !self.is_allowed_to_play() {
self.internal_pause_steps();
}
}

0 comments on commit 0eb2c1d

Please sign in to comment.
You can’t perform that action at this time.