Glype Proxy Software を使用して 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;
}
ビデオを実行するには、プレーヤのソース ファイルでどの入力パラメータを指定すればよいですか? ここに私がテストしているリンクがあります: