<%= content_tag(
  :canvas,
  nil,
  :id => "image",
  :class => "fit-width",
  :width => post.image_width,
  :height => post.image_height,
  "data-ugoira-frames" => post.pixiv_ugoira_frame_data.data.to_json,
  "data-ugoira-content-type" => post.pixiv_ugoira_frame_data.content_type.to_json,
) %>

<div id="ugoira-controls">
  <div id="ugoira-control-panel" class="mb-2 flex items-center" style="width: <%= [@post.image_width, 350].max %>px;">
    <%= button_tag "Play", :id => "ugoira-play", :style => "display: none;" %>
    <%= button_tag "Pause", :id => "ugoira-pause" %>
    <div id="seek-slider" class="ml-4" style="width: <%= [@post.image_width, 350].max - 81 %>px;"></div>
  </div>

  <%= link_to "Save as video (right click and save)", post.tagged_large_file_url %>
</div>
