[Enhancement] Add audio track language selection to Media Profile (#487)
* Moved quality options to their own module * Added language and format selection to quality option builder * [WIP] migrating tests * Added audio_lang to media_profile table * Renamed column; added format options and tests * Adds UI for audio_track to the media profile form * Adds a version string to in-app streams to help with cache busting
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<%= if media_type(@media_item) == :video do %>
|
||||
<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.
|
||||
</video>
|
||||
<% end %>
|
||||
|
||||
<%= if media_type(@media_item) == :audio do %>
|
||||
<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.
|
||||
</audio>
|
||||
<% end %>
|
||||
|
||||
@@ -39,7 +39,10 @@
|
||||
<span class="mx-2">or</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
|
||||
</.subtle_link>
|
||||
</span>
|
||||
|
||||
+10
@@ -125,6 +125,16 @@
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section x-show="advancedMode">
|
||||
<.input
|
||||
field={f[:audio_track]}
|
||||
placeholder="de"
|
||||
type="text"
|
||||
label="Audio Track Language"
|
||||
help="Only works if there are multiple audio tracks. Use either a language code, 'original' for the original audio track, or 'default' for YouTube's preference. Or just leave it blank"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<h3 class="mt-10 text-2xl text-black dark:text-white">
|
||||
Thumbnail Options
|
||||
</h3>
|
||||
|
||||
Reference in New Issue
Block a user