Skip to content

Commit

Permalink
Merge pull request #5507 from avalonmediasystem/fix_hls_caption
Browse files Browse the repository at this point in the history
Add check for captions.content before appending file to captions list
  • Loading branch information
masaball authored Dec 7, 2023
2 parents 440c972 + da879f8 commit ce1a5af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/master_files/hls_manifest.m3u8.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Unless required by applicable law or agreed to in writing, software distributed
%>
#EXTM3U
<% if @master_file.has_captions? %>
<% @master_file.supplemental_file_captions.append(@master_file.captions).each_with_index do |caption, index| %>
<% captions_list = @master_file.supplemental_file_captions %>
<% captions_list.append(@master_file.captions) if @master_file.captions.content %>
<% captions_list.each_with_index do |caption, index| %>
<% label = caption.is_a?(SupplementalFile) ? caption.label : 'English' %>
<% language = caption.is_a?(SupplementalFile) ? caption.language : 'en' %>
<% id = caption.is_a?(SupplementalFile) ? caption.id : 'master_file_caption' %>
Expand Down

0 comments on commit ce1a5af

Please sign in to comment.