3

我正在使用Glype代理软件来制作 youtube 代理网站。进展顺利,但我需要更换视频播放器,www.videojs.com它也已集成!但它说找不到来源。

youtube.com.php plugin(插件文件夹中的文件)中,我尝试了不同的变量作为播放器中的源文件。但他们都没有工作。这是整个功能

function postParse($input, $type) {
    switch($type) {
        case 'html':
            if(!defined('videourl')) {return $input;}

echo "<link href='http://vjs.zencdn.net/4.0/video-js.css' rel='stylesheet'>
<script src='http://vjs.zencdn.net/4.0/video.js'></script>";


            # Create URL to JW Player
            $player_url = GLYPE_URL . '/player.swf';

            # Generate URL to flv file through proxy script

            $flvUrl = rawurlencode(proxyURL(sprintf('%s',videourl)));    
            # Generate HTML for the flash object with our new FLV URL


           $html = "<video class='video-js vjs-default-skin' controls
           preload='auto' width='640' height='360' poster=''
           data-setup='{}'>
           <source src='videourl' type='video/mp4'>
           <source src='videourl' type='video/webm'>
           </video>"; 


    # Add our own player into the player div
        #   $input = preg_replace('#<div id="player".*?</div>.*?</div>#s', '<div id="player"><div id="player-api" class="player-width player-height">' . $html .'</div></div>', $input, 1);

            $input = preg_replace('#<div id="player".*?<div id="watch7-main-container">#s', '<div id="player"><div id="player-api" class="player-width player-height off-screen-target" style="overflow: hidden;">' . $html .'</div></div><div id="watch7-main-container">', $input, 1);


            /*$input = preg_replace('#http:\\\/\\\/s.ytimg.com\\\/yt\\\/swf\\\/watch-vfl157150.swf\\\#s','' . $player_url . '\\',$input, 1);
            $input = preg_replace('#http:\\\/\\\/s.ytimg.com\\\/yt\\\/swf\\\/watch-vfl157150.swf\\\#s','' . $player_url . '\\',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl157150.swf#s','' . $player_url . '',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl127661.swf#s','' . $player_url . '',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_as3-vfl128003.swf#s','' . $player_url . '',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl127661.swf#s','' . $player_url . '',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl142129.swf#s','' . $player_url . '',$input, 1);
            $input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl142129.swf#s','' . $player_url . '',$input, 1);*/
        break;
    }
    return $input;
 }  

我应该在播放器的源文件中提供哪个输入参数以使视频运行? 是我正在测试的链接:

4

0 回答 0