зеркало из https://github.com/mozilla/pjs.git
Bug 487719 - video controls should use addEventListener instead of oncommand. r=gavin
This commit is contained in:
Родитель
b8e676649b
Коммит
b2b8027943
|
@ -59,14 +59,14 @@
|
|||
<vbox>
|
||||
<spacer flex="1"/>
|
||||
<hbox class="controlBar" hidden="true">
|
||||
<button class="playButton" oncommand="document.getBindingParent(this).Utils.togglePause();"/>
|
||||
<button class="playButton"/>
|
||||
<stack class="scrubberStack" flex="1">
|
||||
<box class="backgroundBar"/>
|
||||
<progressmeter class="bufferBar"/>
|
||||
<progressmeter class="progressBar" max="10000"/>
|
||||
<scale class="scrubber" movetoclick="true"/>
|
||||
</stack>
|
||||
<button class="muteButton" oncommand="document.getBindingParent(this).Utils.toggleMute();"/>
|
||||
<button class="muteButton"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</stack>
|
||||
|
@ -601,6 +601,10 @@
|
|||
for each (var event in this.Utils.videoEvents)
|
||||
video.addEventListener(event, this.Utils, false);
|
||||
|
||||
var self = this;
|
||||
this.Utils.muteButton.addEventListener("command", function() { self.Utils.toggleMute(); }, false);
|
||||
this.Utils.playButton.addEventListener("command", function() { self.Utils.togglePause(); }, false);
|
||||
|
||||
this.Utils.log("--- videocontrols initialized ---");
|
||||
]]>
|
||||
</body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче