File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 4141
4242< %
4343 videos = []
44+ videos.push *((item[:attachments] or []).select{|a| a[:mime] == 'video/webm'}.map{|a| $attachments_by_export[a[:filename]][:localname]})
4445 videos.push *((item[:links] or []).select{|l| l[:url] =~ /\.webm$/}.map{|l| l[:url]})
4546 videos
4647 .each do |video|
5657 end
5758 require 'uri'
5859 url = video
59- vtt_url = item[:links].find { |l| l[:url].end_with?('.vtt') }&.[](:url)
6060%>
6161< div class ="video ">
62- < video preload ="none " controls ="controls " width ="75% " crossorigin =" anonymous " >
62+ < video preload ="none " controls ="controls " width ="75% ">
6363 < source src ="<%= url %> " type ='video/webm; codecs="av01.0.08M.08.0.110.01.01.01.0" ' />
6464 < source src ="<%= url.gsub(/\.av1\.webm$/, ".mp4 ") %> " type='video/mp4' />
65- < % if vtt_url %>
66- < track src ="<%= vtt_url %> " label ="Captions " kind ="captions " srclang ="en " />
67- < % end %>
6865 </ video >
6966</ div >
7067< % end %>
You can’t perform that action at this time.
0 commit comments