You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/assets/javascripts/player/fallback_player.js.coffee

22 lines
435 B
CoffeeScript

class AsciiIo.FallbackPlayer extends AsciiIo.AbstractPlayer
createVT: ->
@vt = new AsciiIo.VT @options.cols, @options.lines
createMovie: ->
@movie = new AsciiIo.Movie @movieOptions()
onModelReady: ->
super
bindEvents: ->
super
@movie.on 'reset', => @vt.reset()
@movie.on 'data', (data) =>
@vt.feed data
state = @vt.state()
@vt.clearChanges()
@movie.trigger 'render', state