%PDF- %PDF-
Direktori : /data/shooting/ |
Current File : //data/shooting/video2.php |
<?php $cmd = "find '" . dirname($_SERVER['SCRIPT_FILENAME']) . "' -maxdepth 1 -type d -printf \"%f\n\""; //echo $cmd; exec($cmd, $list); //print_r($list); array_shift($list); sort($list); function url(){ // output: /myproject/index.php $currentPath = $_SERVER['PHP_SELF']; // output: Array ( [dirname] => /myproject [basename] => index.php [extension] => php [filename] => index ) $pathInfo = pathinfo($currentPath); // output: localhost $hostName = $_SERVER['HTTP_HOST']; // output: http:// $protocol = strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https://'?'https://':'http://'; $protocol = "https://"; // return: http://localhost/myproject/ return $protocol.$hostName.$pathInfo['dirname']."/"; } ?><!doctype html> <html> <head> <meta charset="utf-8"> <title>Flowplayer dashjs plugin · Standalone demo · Flowplayer</title> <!-- optimize mobile versions --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- The Flowplayer skin --> <link rel="stylesheet" href="https://releases.flowplayer.org/7.2.1/skin/skin.css"> <!-- Minimal styling for this standalone page (can be removed) --> <style>body { font-family: "myriad pro", tahoma, verdana, arial, sans-serif; font-size: 14px; margin: 0; padding: 0; } #content { margin: 50px auto; max-width: 982px; } </style> <!-- CSS for this demo --> <link rel="stylesheet" href="/media/css/demos/plugins/dashjs.css"> <!-- Flowplayer--> <script src="https://releases.flowplayer.org/7.2.1/flowplayer.min.js"></script> <!-- the dash engine plugin --> <script src="https://releases.flowplayer.org/dashjs/flowplayer.dashjs.min.js"></script> </head> <body> <div id="content"> <div id="fp-dash" class="is-closeable"></div> <script> flowplayer("#fp-dash", { splash: true, ratio: 9/16, // Safari issues with manual switching for this stream // -> disable dash: { qualitiesForSafari: false }, playlist: [ <?php foreach ($list as $video) { ?> { sources: [ { type: "application/dash+xml", src: "<?php echo url() . $video . "/" . $video . ".mpd"; ?>" }, ] }, <?php } ?> ], share: false }).on("ready", function (e, api, video) { document.querySelector("#fp-dash .fp-title").innerHTML = api.engine.engineName + " engine playing " + video.type; }); </script> </div><!--/end content --> </body> </html>