mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Pause help videos when guide modal is not visible
This commit is contained in:
parent
b4b435283b
commit
fb15c0bf94
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ module.exports = class LevelGuideView extends CocoView
|
|||
Backbone.Mediator.publish 'level:docs-shown', {}
|
||||
|
||||
onHidden: ->
|
||||
if @vimeoListenerAttached
|
||||
player = $('#help-video-player')[0]
|
||||
player.contentWindow.postMessage JSON.stringify(method: 'pause'), '*'
|
||||
createjs?.Sound?.setVolume?(@volume ? ( me.get('volume') ? 1.0))
|
||||
Backbone.Mediator.publish 'level:docs-hidden', {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue