From d31f0b30481f6180e7907aee27413e5d208539aa Mon Sep 17 00:00:00 2001 From: RblSb Date: Sun, 7 Jun 2020 18:45:22 +0300 Subject: Playlists "at next" order --- src/client/Player.hx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/client/Player.hx') diff --git a/src/client/Player.hx b/src/client/Player.hx index dd49ab4..7de6d36 100644 --- a/src/client/Player.hx +++ b/src/client/Player.hx @@ -5,6 +5,7 @@ import client.Main.ge; import client.players.Raw; import client.players.Youtube; import client.players.Iframe; +import Types.VideoDataRequest; import Types.VideoData; import Types.VideoItem; using StringTools; @@ -97,14 +98,14 @@ class Player { player = newPlayer; } - public function getVideoData(url:String, callback:(data:VideoData)->Void):Void { - var player = players.find(player -> player.isSupportedLink(url)); + public function getVideoData(data:VideoDataRequest, callback:(data:VideoData)->Void):Void { + var player = players.find(player -> player.isSupportedLink(data.url)); if (player == null) player = rawPlayer; - player.getVideoData(url, callback); + player.getVideoData(data, callback); } - public function getIframeData(iframe:String, callback:(data:VideoData)->Void):Void { - iframePlayer.getVideoData(iframe, callback); + public function getIframeData(data:VideoDataRequest, callback:(data:VideoData)->Void):Void { + iframePlayer.getVideoData(data, callback); } public function setVideo(i:Int):Void { -- cgit v1.2.3