|
|
@ -75,13 +75,19 @@ class AsciiIo.Movie
|
|
|
|
@nextFrame()
|
|
|
|
@nextFrame()
|
|
|
|
|
|
|
|
|
|
|
|
stop: ->
|
|
|
|
stop: ->
|
|
|
|
clearInterval @nextFrameTimeoutId
|
|
|
|
|
|
|
|
@playing = false
|
|
|
|
@playing = false
|
|
|
|
|
|
|
|
@cancelNextFrameProcessing()
|
|
|
|
now = @now()
|
|
|
|
now = @now()
|
|
|
|
|
|
|
|
@adjustFrameWaitTime(now)
|
|
|
|
|
|
|
|
@pausedAt = now
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancelNextFrameProcessing: ->
|
|
|
|
|
|
|
|
clearInterval @nextFrameTimeoutId
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adjustFrameWaitTime: (now) ->
|
|
|
|
resumedAt = @resumedAt or @lastFrameAt
|
|
|
|
resumedAt = @resumedAt or @lastFrameAt
|
|
|
|
currentWaitTime = now - resumedAt
|
|
|
|
currentWaitTime = now - resumedAt
|
|
|
|
@totalFrameWaitTime += currentWaitTime
|
|
|
|
@totalFrameWaitTime += currentWaitTime
|
|
|
|
@pausedAt = now
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
restart: ->
|
|
|
|
restart: ->
|
|
|
|
@reset()
|
|
|
|
@reset()
|
|
|
|