Pass the asciicast with the options object to player partial
parent
a9913a966d
commit
0e85e9ac28
@ -1,18 +1,18 @@
|
|||||||
.player class="#{size}-font"
|
.player class="#{options.size}-font"
|
||||||
|
|
||||||
javascript:
|
javascript:
|
||||||
$(function() {
|
$(function() {
|
||||||
var playerClass = #{player_class};
|
var playerClass = #{options.player_class};
|
||||||
var containerWidth = #{container_width || 'null'};
|
var containerWidth = #{options.max_width || 'null'};
|
||||||
|
|
||||||
window.player = new playerClass({
|
window.player = new playerClass({
|
||||||
el: $('.player'),
|
el: $('.player'),
|
||||||
speed: #{speed},
|
speed: #{options.speed},
|
||||||
benchmark: #{benchmark},
|
benchmark: #{options.benchmark},
|
||||||
model: new Asciinema.Asciicast(#{asciicast.html_safe}),
|
model: new Asciinema.Asciicast(#{asciicast.html_safe}),
|
||||||
containerWidth: containerWidth || $('.cinema .player').parent().width(),
|
containerWidth: containerWidth || $('.cinema .player').parent().width(),
|
||||||
rendererClass: #{renderer_class},
|
rendererClass: #{options.renderer_class},
|
||||||
autoPlay: #{auto_play},
|
autoPlay: #{options.autoplay},
|
||||||
hud: #{hud}
|
hud: #{!options.hide_hud}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue