aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/players
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-05-23 22:06:31 +0300
committerRblSb <msrblsb@gmail.com>2020-05-23 22:06:31 +0300
commit45080aa1f6d80f2ef64983904acbe1645c312d25 (patch)
tree42eb53343e49a564b12951bf6ce7e42992492a36 /src/client/players
parenta45d0bef0dccb5472bec095d8e00af8647173a56 (diff)
Improve history inputs
Diffstat (limited to 'src/client/players')
-rw-r--r--src/client/players/Raw.hx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/client/players/Raw.hx b/src/client/players/Raw.hx
index dacf45c..57dd9b3 100644
--- a/src/client/players/Raw.hx
+++ b/src/client/players/Raw.hx
@@ -33,12 +33,16 @@ class Raw implements IPlayer {
public function getVideoData(url:String, callback:(data:VideoData)->Void):Void {
final decodedUrl = url.urlDecode();
var title = decodedUrl.substr(decodedUrl.lastIndexOf("/") + 1);
- if (matchName.match(title)) title = matchName.matched(1);
+ final isNameMatched = matchName.match(title);
+ if (isNameMatched) title = matchName.matched(1);
else title = Lang.get("rawVideo");
- final isHls = matchName.matched(2).contains("m3u8");
- if (isHls && !isHlsLoaded) {
- loadHlsPlugin(() -> getVideoData(url, callback));
- return;
+ var isHls = false;
+ if (isNameMatched) {
+ isHls = matchName.matched(2).contains("m3u8");
+ if (isHls && !isHlsLoaded) {
+ loadHlsPlugin(() -> getVideoData(url, callback));
+ return;
+ }
}
final video = document.createVideoElement();
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage