aboutsummaryrefslogtreecommitdiffstats
path: root/res/client.js
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2022-11-24 23:17:19 +0300
committerRblSb <msrblsb@gmail.com>2022-11-24 23:17:19 +0300
commite877f070e367a7a9d93b93bf676f4afdb948356f (patch)
tree79a80fd8906ed7b421ba14c560e0bd50635267d0 /res/client.js
parent7c346c43b54210f78f68815d26643ee8a8e949ee (diff)
Youtube shorts support
Diffstat (limited to 'res/client.js')
-rw-r--r--res/client.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/client.js b/res/client.js
index 95ce777..c63a4ef 100644
--- a/res/client.js
+++ b/res/client.js
@@ -3196,6 +3196,7 @@ var client_players_Youtube = function(main,player) {
this.videosUrl = "https://www.googleapis.com/youtube/v3/videos";
this.matchPlaylist = new EReg("youtube\\.com.*list=([A-z0-9_-]+)","");
this.matchEmbed = new EReg("youtube\\.com/embed/([A-z0-9_-]+)","");
+ this.matchShorts = new EReg("youtube\\.com/shorts/([A-z0-9_-]+)","");
this.matchShort = new EReg("youtu\\.be/([A-z0-9_-]+)","");
this.matchId = new EReg("youtube\\.com.*v=([A-z0-9_-]+)","");
this.main = main;
@@ -3217,6 +3218,9 @@ client_players_Youtube.prototype = {
if(this.matchShort.match(url)) {
return this.matchShort.matched(1);
}
+ if(this.matchShorts.match(url)) {
+ return this.matchShorts.matched(1);
+ }
if(this.matchEmbed.match(url)) {
return this.matchEmbed.matched(1);
}
@@ -3354,7 +3358,7 @@ client_players_Youtube.prototype = {
}
callback({ duration : _gthis.tempYoutube.getDuration()});
}, onError : function(e) {
- haxe_Log.trace("Error " + e.data,{ fileName : "src/client/players/Youtube.hx", lineNumber : 201, className : "client.players.Youtube", methodName : "getRemoteDataFallback"});
+ haxe_Log.trace("Error " + e.data,{ fileName : "src/client/players/Youtube.hx", lineNumber : 205, className : "client.players.Youtube", methodName : "getRemoteDataFallback"});
if(_gthis.playerEl.contains(video)) {
_gthis.playerEl.removeChild(video);
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage