aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/players/Iframe.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2021-07-04 03:59:50 +0300
committerRblSb <msrblsb@gmail.com>2021-07-05 17:04:25 +0300
commitede45cea8706eb8540e466df9861c2af8ebf9c44 (patch)
tree74a20a6f082173378f918b48b08542881f31749a /src/client/players/Iframe.hx
parent265b3e1fb56bb0e5f797b3b35227a616b108a0c3 (diff)
Reformat
Diffstat (limited to 'src/client/players/Iframe.hx')
-rw-r--r--src/client/players/Iframe.hx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/client/players/Iframe.hx b/src/client/players/Iframe.hx
index ae37c94..e07f814 100644
--- a/src/client/players/Iframe.hx
+++ b/src/client/players/Iframe.hx
@@ -1,14 +1,13 @@
package client.players;
-import js.html.Element;
-import js.Browser.document;
-import client.Main.ge;
-import Types.VideoDataRequest;
import Types.VideoData;
+import Types.VideoDataRequest;
import Types.VideoItem;
+import client.Main.ge;
+import js.Browser.document;
+import js.html.Element;
class Iframe implements IPlayer {
-
final main:Main;
final player:Player;
final playerEl:Element = ge("#ytapiplayer");
@@ -23,7 +22,7 @@ class Iframe implements IPlayer {
return true;
}
- public function getVideoData(data:VideoDataRequest, callback:(data:VideoData)->Void):Void {
+ public function getVideoData(data:VideoDataRequest, callback:(data:VideoData) -> Void):Void {
final iframe = document.createDivElement();
iframe.innerHTML = data.url;
if (isValidIframe(iframe)) {
@@ -35,8 +34,7 @@ class Iframe implements IPlayer {
function isValidIframe(iframe:Element):Bool {
if (iframe.children.length != 1) return false;
- return (iframe.firstChild.nodeName == "IFRAME"
- || iframe.firstChild.nodeName == "OBJECT");
+ return (iframe.firstChild.nodeName == "IFRAME" || iframe.firstChild.nodeName == "OBJECT");
}
public function loadVideo(item:VideoItem):Void {
@@ -79,5 +77,4 @@ class Iframe implements IPlayer {
}
public function setPlaybackRate(rate:Float):Void {}
-
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage