mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-22 16:19:53 +05:30
Use short URL for sharing videos
This commit is contained in:
parent
8ba45808be
commit
8521f04087
@ -25,12 +25,13 @@ if (player_data.aspect_ratio) {
|
|||||||
|
|
||||||
var embed_url = new URL(location);
|
var embed_url = new URL(location);
|
||||||
embed_url.searchParams.delete('v');
|
embed_url.searchParams.delete('v');
|
||||||
|
short_url = location.origin + '/' + video_data.id + embed_url.search;
|
||||||
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
|
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
|
||||||
|
|
||||||
var shareOptions = {
|
var shareOptions = {
|
||||||
socials: ["fbFeed", "tw", "reddit", "email"],
|
socials: ["fbFeed", "tw", "reddit", "email"],
|
||||||
|
|
||||||
url: window.location.href,
|
url: short_url,
|
||||||
title: player_data.title,
|
title: player_data.title,
|
||||||
description: player_data.description,
|
description: player_data.description,
|
||||||
image: player_data.thumbnail,
|
image: player_data.thumbnail,
|
||||||
|
@ -1240,7 +1240,7 @@ def process_video_params(query, preferences)
|
|||||||
quality = query["quality"]?
|
quality = query["quality"]?
|
||||||
region = query["region"]?
|
region = query["region"]?
|
||||||
related_videos = query["related_videos"]? && (query["related_videos"] == "true" || query["related_videos"] == "1").to_unsafe
|
related_videos = query["related_videos"]? && (query["related_videos"] == "true" || query["related_videos"] == "1").to_unsafe
|
||||||
speed = query["speed"]?.try &.to_f?
|
speed = query["speed"]?.try &.rchop("x").to_f?
|
||||||
video_loop = query["loop"]?.try &.to_i?
|
video_loop = query["loop"]?.try &.to_i?
|
||||||
volume = query["volume"]?.try &.to_i?
|
volume = query["volume"]?.try &.to_i?
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user