Advertisement
Guest User

media player apps

a guest
Feb 5th, 2015
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.33 KB | None | 0 0
  1. <?php
  2.  
  3. function mediaplayer_run($params= '') {
  4.  
  5.     global $checknum;
  6.     global $myPid;
  7.     $currentUser;
  8.     $userDir = um('getCurrentUserDir');
  9.  
  10.  
  11.  
  12.     $myWindow = new Window(array(
  13.         'name' => 'Gmail_WND',
  14.         'father' => 'eyeApps',
  15.         'cent' => 1,
  16.         'width' => $_SESSION['SCREEN']['eyeApps']['width'],
  17.         'height' => $_SESSION['SCREEN']['eyeApps']['height'],
  18.         'x' => 0,
  19.         'y' => 3,
  20.         'title' => 'Mediaplayer',
  21.         'sendResizeMsg'=>1,
  22.         'sigResize'=>'Resize'
  23.     ));
  24.     $myWindow->show();
  25.    
  26. $myContainer = new Container(array(
  27.     'father' => Gmail_WND,
  28.     'height' => $height,
  29.     'name' => test,
  30.     'width' => 1000,
  31.     'x' => 1,
  32.     'y' => 20
  33. ));
  34.    
  35.     $handler = vfs('open', array($params[0], 'w'));
  36. $video=$params[0];
  37.         $Open_File = str_replace(um('getCurrentUserDir').'files/', '/', $params[0]);
  38.         $Open_File = str_replace('//', '/', $Open_File);
  39.         $video=$Open_File;
  40.        
  41.        
  42. $myContainer->show();
  43. $myContainer->setContent('<html>
  44. <head>
  45. <script src="index.php?extern=apps/mediaplayer/jquery.js"></script>
  46. <script src="index.php?extern=apps/mediaplayer/mediaelement-and-player.min.js"></script>
  47. <link rel="stylesheet" href="index.php?extern=apps/mediaplayer/mediaelementplayer.css" />
  48. </head>
  49. <body>
  50.  
  51. <video width="50%" height="50%" controls="controls" preload="auto">
  52.    <!-- MP4 for Safari, IE9, iPhone, iPad, Android, and Windows Phone 7 -->
  53.    <source type="video/mp4" src="'.$handler.'" />
  54.    <!-- Optional: Add subtitles for each language -->
  55.    <track kind="subtitles" src="subtitles.srt" />
  56.    <!-- Optional: Add chapters -->
  57.    <track kind="chapters" src="chapters.srt" />
  58.    <!-- Flash fallback for non-HTML5 browsers without JavaScript -->
  59.    <object width="100%" height="100%" type="application/x-shockwave-flash" data="index.php?extern=apps/mediaplayer/flashmediaelement.swf">
  60.        <param name="movie" value="index.php?extern=apps/mediaplayer/flashmediaelement.swf" />
  61.        <param name="flashvars" value="controls=true&file='.$handler.'" />
  62.        <!-- Image as a last resort -->
  63.        <img src="myvideo.jpg" width="100%" height="100%" title="No video playback capabilities" />
  64.    </object>
  65. </video>
  66. <script>
  67. // using jQuery
  68. $("video,audio").mediaelementplayer(/* Options */);
  69. </script>
  70. <p>'.$handler.'</p>
  71. </body>
  72. </html>');
  73. }
  74.  
  75. function mediaplayer_end($params= '') {
  76.     reqLib('eyeWidgets','unserialize');
  77. }
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement