X-Git-Url: https://git.cweiske.de/playVideoOnDreamboxProxy.git/blobdiff_plain/c1e0e9b0db08fa917d3a5ef474e6f3e316ccf672..e49228d52d2c0ef42444b20ffcd543241bdf485c:/www/play.php diff --git a/www/play.php b/www/play.php index 983cd7f..d96764d 100644 --- a/www/play.php +++ b/www/play.php @@ -8,6 +8,16 @@ if (file_exists($cfgFile)) { include $cfgFile; } +//for the firefox extension +header('Access-Control-Allow-Origin: *'); + +if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET') { + require __DIR__ . '/form.php'; + exit(); +} + +set_error_handler('errorHandlerStore'); + $pageUrl = getPageUrl(); $json = getYoutubeDlJson($pageUrl, $youtubedlPath); $videoUrl = extractVideoUrlFromJson($json);