Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Glype YouTube插件播放器源代码_Php_Plugins_Youtube - Fatal编程技术网

Php Glype YouTube插件播放器源代码

Php Glype YouTube插件播放器源代码,php,plugins,youtube,Php,Plugins,Youtube,我正在使用代理软件制作youtube代理网站。这很顺利,但我需要用www.videojs.com更换视频播放器,而且它也是集成的!但它说没有找到来源 在youtube.com.php plugin(plugins文件夹中的文件)中,我在播放器中尝试了不同的变量作为源文件。但他们都没有工作。下面是整个函数 function postParse($input, $type) { switch($type) { case 'html': if(!defi

我正在使用代理软件制作youtube代理网站。这很顺利,但我需要用
www.videojs.com
更换视频播放器,而且它也是集成的!但它说没有找到来源

youtube.com.php plugin
(plugins文件夹中的文件)中,我在播放器中尝试了不同的变量作为源文件。但他们都没有工作。下面是整个函数

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;
 }  
函数postParse($input,$type){
交换机($类型){
案例“html”:
如果(!defined('videourl'){return$input;}
回声“
";
#创建JW播放器的URL
$player_url=GLYPE_url.'/player.swf';
#通过代理脚本生成flv文件的URL
$flvUrl=rawurlencode(proxyURL(sprintf('%s',videourl));
#使用新的FLV URL为flash对象生成HTML
$html=”
"; 
#将我们自己的玩家添加到玩家div中
#$input=preg_replace($input)#