Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* eyeOS project
- Internet Based Operating System
- Version 1.0
- www.eyeOS.org - www.eyeOS.info
- -----------------------------------------------------------------
- eyeOS Team
- http://www.eyeos.org/whoarewe
- -----------------------------------------------------------------
- eyeOS is released under the GNU General Public License - GPL
- provided with this release in license.txt
- or via web at www.gnu.org/licenses/gpl.txt
- Copyright 2005-2007 eyeOS Team (team@eyeos.org)
- To help continued development please consider a donation at
- http://www.eyeos.org/donations
- */
- function mediaplayer_on_Message($params='') {
- reqLib('eyeWidgets','updateContent',$params);
- }
- function mediaplayer_on_Resize($params= '') {
- $width = $params['arg'][0];
- $height = $params['arg'][1];
- $width = intval($width);
- $height = intval($height);
- $GLOBALS['GmailFrame']->setWidth($width-10);
- $GLOBALS['GmailFrame']->setHeight($height-28);
- }
- function mediaplayer_on_Close($params = ''){
- global $myPid;
- service('proc','close',array($myPid));
- }
- function mediaplayer_on_getFile($params = null) {
- // Get the input URL back from the "Hidden" widget
- $url = $GLOBALS['mediaplayer_Hidden']->text;
- // Clean some path relevant things
- $filename = basename($url);
- $path = eyeFiles('cleanPath', array(substr(trim($url, '/\\'), 0, -strlen($filename)))); // utf8
- // Specify the file's content length
- header('Accept-Ranges: bytes');
- if ($path[1] === 'real') {
- header('Content-Length: ' . vfs('real_filesize', array($path[0] . '/' . $filename)));
- } else {
- header('Content-Length: ' . vfs('filesize', array($path[0] . '/' . $filename)));
- }
- // Specify the file's content type
- header('Content-Type: video/mp4');
- // Echo the file content
- if ($path[1] === 'real') {
- vfs('printFile', array($path[0] . '/' . $filename));
- } else {
- vfs('readFile', array($path[0] . '/' . $filename));
- }
- // Exit the HTTP request
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement