Compare commits

...

4 Commits

Author SHA1 Message Date
bonjinnorenka
4bb9a618be
error message more easy to understand
Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
2023-08-29 07:56:52 +09:00
bonjinnorenka
024246d1b3
embed.js target_origin more short code
Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
2023-08-29 07:51:48 +09:00
bonjinnorenka
e9faeb793b
invidious_iframe_api.js fix typo
Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
2023-08-29 07:46:30 +09:00
bonjinnorenka
bfba48af81
embed.js additional_info more short
Co-authored-by: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com>
2023-08-29 07:45:33 +09:00
2 changed files with 4 additions and 8 deletions

View File

@ -78,14 +78,10 @@ function return_message(message,target_window){
additional_info['value'] = add_value;
}
if(message.eventname==='error'){
let add_value = {geterrorcode:player.error().code};
additional_info['value'] = add_value;
additional_info['value'] = {geterrorcode:player.error().code};
}
message = Object.assign(additional_info,message);
let target_origin = url_params.get('origin');
if(target_origin===null){
target_origin = '*';
}
let target_origin = url_params.get('origin') || '*';
target_window.postMessage(message,target_origin);
}

View File

@ -30,7 +30,7 @@ class invidious_embed{
this.eventobject = {ready:[],ended:[],error:[],ratechange:[],volumechange:[],waiting:[],timeupdate:[],loadedmetadata:[],play:[],seeking:[],seeked:[],playerresize:[],pause:[],statechange:[]};
var replace_elemnt;
if(element===undefined||element===null){
throw 'please set element id or HTMLElement';
throw 'Please, pass element id or HTMLElement as first argument';
}
else if(typeof element==='string'){
replace_elemnt = document.getElementById(element);
@ -346,7 +346,7 @@ class invidious_embed{
cueVideoById(option,startSeconds){
this.playOtherVideoById(option,false,startSeconds);
}
cuevVideoByUrl(option,startSeconds){
cueVideoByUrl(option,startSeconds){
this.playOtherVideoById(option,false,startSeconds);
}
loadVideoByUrl(option,startSeconds){