Skip to content

Commit

Permalink
feat(common): add movie trailer
Browse files Browse the repository at this point in the history
  • Loading branch information
trueChazza committed Dec 27, 2021
1 parent 9a9d0e7 commit b718ee0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/media_server_web/live/movies_live/show.html.heex
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<section class="row">
<article class="column">

<img style="margin-bottom: 2.5rem;" src={"#{(Enum.filter(@decoded["images"], fn x -> x["coverType"] === "fanart" end) |> Enum.at(0))["remoteUrl"]}"}>
<h2><%= @decoded["title"] %></h2>
<p><%= @decoded["year"] %> - <%= @decoded["runtime"] %> minutes</p>

<h2><%= @page_title %></h2>
<p>Runtime: <%= @decoded["runtime"] %> minutes</p>
<iframe type="text/html" style="width: 100%; margin-bottom: 2.5rem;" height="360"
src={"https://www.youtube.com/embed/#{ @decoded["youTubeTrailerId"] }"}
frameborder="0"></iframe>

<%= if @decoded["hasFile"] do %>
<p><button phx-click="play" phx-value-movie={@decoded["id"]}>Play</button></p>
<% end %>

<p><%= @decoded["overview"] %></p>

</article>
</section>

0 comments on commit b718ee0

Please sign in to comment.