|
|
@ -27,23 +27,25 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<script id="video_data" type="application/json">
|
|
|
|
<script id="video_data" type="application/json">
|
|
|
|
|
|
|
|
<%=
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"id": "<%= video.id %>",
|
|
|
|
"id" => video.id,
|
|
|
|
"index": "<%= continuation %>",
|
|
|
|
"index" => continuation,
|
|
|
|
"plid": "<%= plid %>",
|
|
|
|
"plid" => plid,
|
|
|
|
"length_seconds": <%= video.length_seconds.to_f %>,
|
|
|
|
"length_seconds" => video.length_seconds.to_f,
|
|
|
|
"play_next": <%= !rvs.empty? && !plid && params.continue %>,
|
|
|
|
"play_next" => !rvs.empty? && !plid && params.continue,
|
|
|
|
"next_video": "<%= rvs.select { |rv| rv["id"]? }[0]?.try &.["id"] %>",
|
|
|
|
"next_video" => rvs.select { |rv| rv["id"]? }[0]?.try &.["id"],
|
|
|
|
"youtube_comments_text": "<%= HTML.escape(translate(locale, "View YouTube comments")) %>",
|
|
|
|
"youtube_comments_text" => HTML.escape(translate(locale, "View YouTube comments")),
|
|
|
|
"reddit_comments_text": "<%= HTML.escape(translate(locale, "View Reddit comments")) %>",
|
|
|
|
"reddit_comments_text" => HTML.escape(translate(locale, "View Reddit comments")),
|
|
|
|
"reddit_permalink_text": "<%= HTML.escape(translate(locale, "View more comments on Reddit")) %>",
|
|
|
|
"reddit_permalink_text" => HTML.escape(translate(locale, "View more comments on Reddit")),
|
|
|
|
"comments_text": "<%= HTML.escape(translate(locale, "View `x` comments", "{commentCount}")) %>",
|
|
|
|
"comments_text" => HTML.escape(translate(locale, "View `x` comments", "{commentCount}")),
|
|
|
|
"hide_replies_text": "<%= HTML.escape(translate(locale, "Hide replies")) %>",
|
|
|
|
"hide_replies_text" => HTML.escape(translate(locale, "Hide replies")),
|
|
|
|
"show_replies_text": "<%= HTML.escape(translate(locale, "Show replies")) %>",
|
|
|
|
"show_replies_text" => HTML.escape(translate(locale, "Show replies")),
|
|
|
|
"params": <%= params.to_json %>,
|
|
|
|
"params" => params,
|
|
|
|
"preferences": <%= preferences.to_json %>,
|
|
|
|
"preferences" => preferences,
|
|
|
|
"premiere_timestamp": <%= video.premiere_timestamp.try &.to_unix || "null" %>
|
|
|
|
"premiere_timestamp" => video.premiere_timestamp.try &.to_unix
|
|
|
|
}
|
|
|
|
}.to_pretty_json
|
|
|
|
|
|
|
|
%>
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="player-container" class="h-box">
|
|
|
|
<div id="player-container" class="h-box">
|
|
|
|