Auto-adjusting of poster to given t
parent
dfde97417f
commit
4d9c9ff0c5
@ -1,3 +1,12 @@
|
|||||||
class EmbedPlaybackOptions < PlaybackOptions
|
class EmbedPlaybackOptions < PlaybackOptions
|
||||||
attribute :autoplay, Boolean, default: false
|
attribute :autoplay, Boolean, default: false
|
||||||
|
|
||||||
|
def as_json(*)
|
||||||
|
if !poster && t && t > 0
|
||||||
|
super.merge({ poster: "npt:#{t}" })
|
||||||
|
else
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue