<h1>Editing Movie</h1>

<%= render partial: 'form' %>

<div class="preview">
  <h3>Make a Preview</h3>

  <p>
    This will produce a MP4-version preview of the file. It will take usually 3-4 times the movie length.
    The program will run in the background and the preview file will automatically added to the movie.
  </p>

  <%= form_tag({ action: "preview", id: @movie.id }, { class: 'square' }) do %>
    <div class="fields horizontal">
      <%= label_tag "Resolution" %>
      <div class="inputs">
        <%= text_field_tag "x", "800", size: 2 %> x <%= text_field_tag "y", "600", size: 2 %>  
      </div>
    </div>

    <div class="controls">
      <%= submit_tag "Make a Preview" %>
    </div>
  <% end %>
</div>


<div class="snapshot">
  <h3>Take a Snapshot</h3>

  <%= form_tag({ action: "snapshot", id: @movie.id }, { class: 'square' }) do %>
    <div class="fields horizontal">
      <%= label_tag "Seconds" %>
      <%= text_field_tag "secs" %>
    </div>

    <div class="controls">
      <%= submit_tag "Take Snapshot" %>
    </div>
  <% end %>
</div>

<div class="stream">
  <h3>Download (Stream)</h3>

  <%= form_tag({ action: "download", id: @movie.id }, { class: 'square' }) do %>
    <p>This will start downloading the video from an IP and Port.</p>

    <div class="fields horizontal">
      <%= label_tag "IP" %>
      <%= text_field_tag "ip", "", size: 12 %>
    </div>

    <div class="fields horizontal">
      <%= label_tag "Port" %>
      <%= text_field_tag "port", "", size: 3 %>
    </div>

    <div class="controls">
      <%= submit_tag "Download" %>
    </div>
  <% end %>
</div>
  
  