mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 20:51:56 +00:00 
			
		
		
		
	Use videojs-markers for start end end times
This commit is contained in:
		| @@ -287,7 +287,7 @@ get "/watch" do |env| | ||||
|   subscriptions ||= [] of String | ||||
|  | ||||
|   autoplay = env.params.query["autoplay"]?.try &.to_i | ||||
|   video_loop = env.params.query["video_loop"]?.try &.to_i | ||||
|   video_loop = env.params.query["loop"]?.try &.to_i | ||||
|  | ||||
|   if preferences | ||||
|     autoplay ||= preferences.autoplay.to_unsafe | ||||
| @@ -1287,6 +1287,10 @@ get "/embed/:id" do |env| | ||||
|   video_loop = env.params.query["loop"]?.try &.to_i | ||||
|   video_loop ||= 0 | ||||
|  | ||||
|   autoplay = autoplay == 1 | ||||
|   video_loop = video_loop == 1 | ||||
|   controls = controls == 1 | ||||
|  | ||||
|   begin | ||||
|     video = get_video(id, PG_DB) | ||||
|   rescue ex | ||||
| @@ -1294,6 +1298,20 @@ get "/embed/:id" do |env| | ||||
|     next templated "error" | ||||
|   end | ||||
|  | ||||
|   if video.info["hlsvp"]? | ||||
|     hlsvp = video.info["hlsvp"] | ||||
|  | ||||
|     if Kemal.config.ssl || CONFIG.https_only | ||||
|       scheme = "https://" | ||||
|     else | ||||
|       scheme = "http://" | ||||
|     end | ||||
|     host = env.request.headers["Host"] | ||||
|     url = "#{scheme}#{host}" | ||||
|  | ||||
|     hlsvp = hlsvp.gsub("https://manifest.googlevideo.com", url) | ||||
|   end | ||||
|  | ||||
|   fmt_stream = [] of HTTP::Params | ||||
|   video.info["url_encoded_fmt_stream_map"].split(",") do |string| | ||||
|     if !string.empty? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Omar Roth
					Omar Roth