Created
July 18, 2016 23:31
-
-
Save nhjm449/09f9a907f5f01200caf92a7d708ba047 to your computer and use it in GitHub Desktop.
hls.js demo page JavaScript proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET['v']) && $_GET['v'] !== '') { | |
header('Content-Type: text/javascript'); | |
if ($_GET['v'] === 'v0.5.41-custom') { | |
$script = file_get_contents('hls-v0.5.41-custom.js'); | |
} else { | |
$script = file_get_contents('https://github.com/dailymotion/hls.js/raw/' . urlencode($_GET['v']) . '/dist/hls.js'); | |
} | |
if (strlen($script) > 0) { | |
echo $script; | |
} else { | |
echo 'alert("Invalid version tag!");'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment