Skip to content

Commit

Permalink
修复player-demo上一首、下一首切换的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hustKiwi committed Jun 21, 2014
1 parent 5b15b35 commit a8d11d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/js/core/engines/audioCore.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ do (root = this, factory = (cfg, utils, EngineCore, Modernizr) ->
super(volume)

setMute: (mute) ->
mute = !!mute
@audio.muted = mute
super(mute)

Expand Down
11 changes: 10 additions & 1 deletion src/js/core/engines/engine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,23 @@ do (root = this, factory = (cfg, utils, Events, EngineCore, AudioCore, FlashMP3C

pause: () ->
@curEngine.pause()
@setState(STATES.PAUSE)
@

stop: () ->
@curEngine.stop()
@setState(STATES.STOP)
@

setState: (st) ->
@curEngine.setState(st)
@

getState: () ->
@curEngine.getState()

setMute: (mute) ->
@curEngine.setMute(mute) if utils.isBoolean(mute)
@curEngine.setMute(!!mute)
@

getMute: () ->
Expand Down
1 change: 0 additions & 1 deletion src/js/core/engines/flashCore.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ do (root = this, factory = (cfg, utils, Timer, EngineCore) ->
@flash.setData('mute', mute)

setMute: (mute) ->
mute = !!mute
@_setMute(mute)
super(mute)

Expand Down

0 comments on commit a8d11d4

Please sign in to comment.