Merge pull request #1595 from saltycrys/improve-storyboards

Improve storyboards
This commit is contained in:
Perflyst 2020-12-23 14:30:10 +01:00 committed by GitHub
commit 8df591e8d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 6 deletions

View File

@ -1,3 +0,0 @@
.video-js .vjs-vtt-thumbnail-display {
max-width: 158px;
}

View File

@ -1873,14 +1873,14 @@ get "/api/v1/storyboards/:id" do |env|
storyboard[:storyboard_count].times do |i| storyboard[:storyboard_count].times do |i|
url = storyboard[:url] url = storyboard[:url]
authority = /(i\d?).ytimg.com/.match(url).not_nil![1]? authority = /(i\d?).ytimg.com/.match(url).not_nil![1]?
url = storyboard[:url].gsub("$M", i).gsub(%r(https://i\d?.ytimg.com/sb/), "") url = url.gsub("$M", i).gsub(%r(https://i\d?.ytimg.com/sb/), "")
url = "#{HOST_URL}/sb/#{authority}/#{url}" url = "#{HOST_URL}/sb/#{authority}/#{url}"
storyboard[:storyboard_height].times do |j| storyboard[:storyboard_height].times do |j|
storyboard[:storyboard_width].times do |k| storyboard[:storyboard_width].times do |k|
str << <<-END_CUE str << <<-END_CUE
#{start_time}.000 --> #{end_time}.000 #{start_time}.000 --> #{end_time}.000
#{url}#xywh=#{storyboard[:width] * k},#{storyboard[:height] * j},#{storyboard[:width]},#{storyboard[:height]} #{url}#xywh=#{storyboard[:width] * k},#{storyboard[:height] * j},#{storyboard[:width] - 2},#{storyboard[:height]}
END_CUE END_CUE

View File

@ -3,7 +3,6 @@
<link rel="stylesheet" href="/css/videojs.markers.min.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/videojs.markers.min.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-share.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/videojs-share.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-vtt-thumbnails.css?v=<%= ASSET_COMMIT %>"> <link rel="stylesheet" href="/css/videojs-vtt-thumbnails.css?v=<%= ASSET_COMMIT %>">
<link rel="stylesheet" href="/css/videojs-vtt-thumbnails-fix.css?v=<%= ASSET_COMMIT %>">
<script src="/js/global.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/global.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/video.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/video.min.js?v=<%= ASSET_COMMIT %>"></script>
<script src="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>"></script>