mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Merge pull request #3562 from edtrist/PauseModalVideo
Pause help videos when guide modal is not visible
This commit is contained in:
commit
3c715ceba8
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…
Reference in a new issue