Update player.js

About issue : https://github.com/iv-org/invidious/issues/3933

I think it should be reviewed here: 507bed6313/assets/js/player.js (L40) 

short_url will be used here : 507bed6313/assets/js/player.js (L119)

since get embedCode() a little further down returns a correct code by calling the same function on line 127

I would suggest changing this: "var short_url = location.origin + '/' + video_data.id + embed_url.search;" 
to this "var short_url = location.origin + '/watch?v=' + video_data.id + embed_url.search;"
This commit is contained in:
rnek0 2023-07-13 23:29:47 +02:00 committed by GitHub
parent 507bed6313
commit 8f34dbdc50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ if (player_data.aspect_ratio) {
var embed_url = new URL(location);
embed_url.searchParams.delete('v');
var short_url = location.origin + '/' + video_data.id + embed_url.search;
var short_url = location.origin + '/watch?v=' + video_data.id + embed_url.search;
embed_url = location.origin + '/embed/' + video_data.id + embed_url.search;
var save_player_pos_key = 'save_player_pos';