Allow overriding player cols & rows via query params
This commit is contained in:
parent
cd10c59a46
commit
c4e494e224
@ -11,8 +11,8 @@ module AsciicastsHelper
|
||||
opts = {
|
||||
id: 'player',
|
||||
src: asciicast.url,
|
||||
cols: asciicast.width,
|
||||
rows: asciicast.height,
|
||||
cols: options.cols || asciicast.width,
|
||||
rows: options.rows || asciicast.height,
|
||||
poster: options.poster || base64_poster(asciicast),
|
||||
speed: options.speed,
|
||||
autoplay: options.autoplay,
|
||||
|
@ -23,6 +23,8 @@ class PlaybackOptions
|
||||
attribute :t, Time
|
||||
attribute :v0, Boolean, default: false
|
||||
attribute :poster, String
|
||||
attribute :cols, Integer
|
||||
attribute :rows, Integer
|
||||
|
||||
def autoplay()
|
||||
ap = super
|
||||
|
Loading…
Reference in New Issue
Block a user