Add support for VR videos through videojs-vr

This commit is contained in:
syeopite
2021-04-11 06:09:10 -07:00
parent 8806c57c63
commit df0cd30236
6 changed files with 192 additions and 1 deletions

View File

@@ -760,6 +760,10 @@ struct Video
info["microformat"]?.try &.["playerMicroformatRenderer"]["isFamilySafe"]?.try &.as_bool || false
end
def is_vr : Bool
info["streamingData"]?.try &.["adaptiveFormats"].as_a[0]?.try &.["projectionType"].as_s == "MESH" ? true : false || false
end
def wilson_score : Float64
ci_lower_bound(likes, likes + dislikes).round(4)
end