Adds a version string to in-app streams to help with cache busting
This commit is contained in:
parent
a2cc4e78ff
commit
177434cf3a
2 changed files with 6 additions and 3 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
<%= if media_type(@media_item) == :video do %>
|
<%= if media_type(@media_item) == :video do %>
|
||||||
<video controls class="max-h-128 w-full">
|
<video controls class="max-h-128 w-full">
|
||||||
<source src={~p"/media/#{@media_item.uuid}/stream"} type="video/mp4" />
|
<source src={~p"/media/#{@media_item.uuid}/stream?v=#{DateTime.to_unix(@media_item.updated_at)}"} type="video/mp4" />
|
||||||
Your browser does not support the video element.
|
Your browser does not support the video element.
|
||||||
</video>
|
</video>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= if media_type(@media_item) == :audio do %>
|
<%= if media_type(@media_item) == :audio do %>
|
||||||
<audio controls class="w-full">
|
<audio controls class="w-full">
|
||||||
<source src={~p"/media/#{@media_item.uuid}/stream"} type="audio/mpeg" />
|
<source src={~p"/media/#{@media_item.uuid}/stream?v=#{DateTime.to_unix(@media_item.updated_at)}"} type="audio/mpeg" />
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,10 @@
|
||||||
<span class="mx-2">or</span>
|
<span class="mx-2">or</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<.subtle_link href={~p"/media/#{@media_item.uuid}/stream"} target="_blank">
|
<.subtle_link
|
||||||
|
href={~p"/media/#{@media_item.uuid}/stream?v=#{DateTime.to_unix(@media_item.updated_at)}"}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
Open Local Stream
|
Open Local Stream
|
||||||
</.subtle_link>
|
</.subtle_link>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue