|
|
@ -245,6 +245,7 @@ struct VideoPreferences
|
|
|
|
property extend_desc : Bool
|
|
|
|
property extend_desc : Bool
|
|
|
|
property video_start : Float64 | Int32
|
|
|
|
property video_start : Float64 | Int32
|
|
|
|
property volume : Int32
|
|
|
|
property volume : Int32
|
|
|
|
|
|
|
|
property vr_mode : Bool
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
struct Video
|
|
|
|
struct Video
|
|
|
@ -1057,6 +1058,7 @@ def process_video_params(query, preferences)
|
|
|
|
video_loop = query["loop"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
video_loop = query["loop"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
extend_desc = query["extend_desc"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
extend_desc = query["extend_desc"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
volume = query["volume"]?.try &.to_i?
|
|
|
|
volume = query["volume"]?.try &.to_i?
|
|
|
|
|
|
|
|
vr_mode = query["vr_mode"]?.try { |q| (q == "true" || q == "1").to_unsafe }
|
|
|
|
|
|
|
|
|
|
|
|
if preferences
|
|
|
|
if preferences
|
|
|
|
# region ||= preferences.region
|
|
|
|
# region ||= preferences.region
|
|
|
@ -1076,6 +1078,7 @@ def process_video_params(query, preferences)
|
|
|
|
video_loop ||= preferences.video_loop.to_unsafe
|
|
|
|
video_loop ||= preferences.video_loop.to_unsafe
|
|
|
|
extend_desc ||= preferences.extend_desc.to_unsafe
|
|
|
|
extend_desc ||= preferences.extend_desc.to_unsafe
|
|
|
|
volume ||= preferences.volume
|
|
|
|
volume ||= preferences.volume
|
|
|
|
|
|
|
|
vr_mode ||= preferences.vr_mode.to_unsafe
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe
|
|
|
|
annotations ||= CONFIG.default_user_preferences.annotations.to_unsafe
|
|
|
@ -1094,6 +1097,7 @@ def process_video_params(query, preferences)
|
|
|
|
video_loop ||= CONFIG.default_user_preferences.video_loop.to_unsafe
|
|
|
|
video_loop ||= CONFIG.default_user_preferences.video_loop.to_unsafe
|
|
|
|
extend_desc ||= CONFIG.default_user_preferences.extend_desc.to_unsafe
|
|
|
|
extend_desc ||= CONFIG.default_user_preferences.extend_desc.to_unsafe
|
|
|
|
volume ||= CONFIG.default_user_preferences.volume
|
|
|
|
volume ||= CONFIG.default_user_preferences.volume
|
|
|
|
|
|
|
|
vr_mode ||= CONFIG.default_user_preferences.vr_mode.to_unsafe
|
|
|
|
|
|
|
|
|
|
|
|
annotations = annotations == 1
|
|
|
|
annotations = annotations == 1
|
|
|
|
autoplay = autoplay == 1
|
|
|
|
autoplay = autoplay == 1
|
|
|
@ -1104,6 +1108,7 @@ def process_video_params(query, preferences)
|
|
|
|
related_videos = related_videos == 1
|
|
|
|
related_videos = related_videos == 1
|
|
|
|
video_loop = video_loop == 1
|
|
|
|
video_loop = video_loop == 1
|
|
|
|
extend_desc = extend_desc == 1
|
|
|
|
extend_desc = extend_desc == 1
|
|
|
|
|
|
|
|
vr_mode = vr_mode == 1
|
|
|
|
|
|
|
|
|
|
|
|
if CONFIG.disabled?("dash") && quality == "dash"
|
|
|
|
if CONFIG.disabled?("dash") && quality == "dash"
|
|
|
|
quality = "high"
|
|
|
|
quality = "high"
|
|
|
@ -1153,6 +1158,7 @@ def process_video_params(query, preferences)
|
|
|
|
extend_desc: extend_desc,
|
|
|
|
extend_desc: extend_desc,
|
|
|
|
video_start: video_start,
|
|
|
|
video_start: video_start,
|
|
|
|
volume: volume,
|
|
|
|
volume: volume,
|
|
|
|
|
|
|
|
vr_mode: vr_mode
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
return params
|
|
|
|
return params
|
|
|
|