Display snapshot for not started movie

openid
Marcin Kulik 13 years ago
parent 45d6683cd5
commit 7b33c31c70

@ -20,6 +20,7 @@ class AsciiIo.PlayerView extends Backbone.View
@$el.append(@rendererView.$el)
@rendererView.afterInsertedToDom()
@rendererView.renderSnapshot @options.snapshot
createHudView: ->
@hudView = new AsciiIo.HudView(cols: this.options.cols)

@ -29,6 +29,13 @@ class AsciiIo.Renderer.Base extends Backbone.View
@fixTerminalElementSize()
@fixPlayerContainerSize()
renderSnapshot: (text) ->
i = 0
for line in text.split("\n")
fragments = [[line, AsciiIo.Brush.normal()]]
@renderLine i, fragments, undefined
i++
fixTerminalElementSize: ->
fixPlayerContainerSize: ->

@ -44,7 +44,8 @@ module AsciicastsHelper
benchmark: #{benchmark},
model: new AsciiIo.Asciicast({ id: #{asciicast.id} }),
rendererClass: #{renderer_class},
autoPlay: #{auto_play}
autoPlay: #{auto_play},
snapshot: "#{j asciicast.snapshot.to_s}"
});
});
</script>

Loading…
Cancel
Save