diff options
Diffstat (limited to 'videos.rb')
-rwxr-xr-x | videos.rb | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -18,9 +18,7 @@ videos.each_with_index do |dir, _i| mp4 = File.join(MEDIA_URL, 'videos', File.basename(dir), title.gsub(' ', '_') + '.mp4') webm = File.join(MEDIA_URL, 'videos', File.basename(dir), title.gsub(' ', '_') + '.webm') poster = File.join(MEDIA_URL, 'videos', File.basename(dir), title.gsub(' ', '_') + '.webp') - w, h = `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 #{webm}`.chomp.split(',') - - html += "<video controls preload='none' width='#{w}' height='#{h}' poster='#{poster}'> + html += "<video controls preload='none' poster='#{poster}'> <source src='#{webm}' type='video/webm'> <source src='#{mp4}' type='video/mp4'> <a href=#{mp4}>#{mp4}</a> @@ -29,6 +27,5 @@ videos.each_with_index do |dir, _i| html += lines.join('<br>') html += '</div>' end -html += '<p> © pdp8 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>' html += File.read(File.join(SNIPPETS, 'tail.html')) print_html 'videos', html |