Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Youtube plugin not working (proxy)
#1
I have run a proxy for about a year now, for use at school.

Today I noticed the youtube plugin was not wokring and the video was just not loading.

I tried updating the plugin to the latest version I could find (released early this year) and its not working either! I am just being presented with the youtube.com.php file (in text) under an encoded URL.

The proxy script is Glype 1.1, and the the plugin I'm using consist of flowplayer and this youtube.com.php file:
Code:
<?php
/*****************************************************************
* Plugin: FlowTube
* Description:
*    Replaces the YouTube player with FlowPlayer, which loads
*    the original FLV file directly.
* Author: kronflux
******************************************************************/

// Increase timeout to 60 minutes
$toSet[CURLOPT_TIMEOUT] = 7200;


// Strip javascript to stop existing javascript from intefering
// $options['stripJS'] = false;
// Currently not needed, but if problems arise, just uncomment it and see if that helps.


// Pre-parsing applied BEFORE main proxy parser
function preParse($input, $type)
{
switch ($type)
{
case 'html':

// Look for video ID and record it
if (preg_match('#pageVideoId\s\=\s\'(.{11})\'#', $input, $videoId))
{
define('VIDEO_ID', $videoId[1]);
}

// Look for T-value. Purpose unknown but seems to be required. Maybe a token
// to complicate downloading FLV files?
if (preg_match('#\"t\"\:\s"(.*)"#', $input, $tValue))
{
define('T_VALUE', $tValue[1]);
}
// Remove noscript message
$input = preg_replace('#\<noscript\>Hello, you either have JavaScript turned off or an old version of Adobe.*?\<\/noscript\>#s', '', $input, 1);
$input = preg_replace('#var\sfo\s\=\swriteMoviePlayer\(\"watch-player-div\", false, null, null, \"100%\", \"100%\"\)\;#', '', $input, 1);
$input = preg_replace('#document.write\(\'Hello, you either have JavaScript turned off or an old version of Adobe.*?\<\/a\>.\'\)\;#s', '', $input, 1);

break;
}

return $input;

}


// Post-parsing applied AFTER main proxy parser.
function postParse($input, $type)
{
switch ($type)
{
// Apply changes to HTML documents
case 'html':

// Check we have a video to show and if not, return unchanged
if ( ! defined('VIDEO_ID') || ! defined('T_VALUE') )
{
return $input;
}

// Create URL to mediaplayer
$flowPlayerUrl = GLYPE_URL . '/plugins/flowplayer-3.1.1.swf';

// Generate URL to flv file and preview image through proxy script
$flvUrl = rawurlencode(proxifyURL(sprintf('http://www.youtube.com/get_video?video_id=%s&t=%s', VIDEO_ID, T_VALUE)));
$imgUrl = rawurlencode(proxifyURL(sprintf('http://img.youtube.com/vi/%s/0.jpg', VIDEO_ID)));

// Generate HTML for the flash object with our new FLV URL
$html = <<<OUT
<embed src="{$flowPlayerUrl}"
width="620"
height="380"
id="FlowPlayer"
name="FlowPlayer"
bgcolor="000000"
allowscriptaccess="always"
allowfullscreen="true"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
flashvars="id=player&config={'playlist':['$flvUrl']}&width=620&height=380&type=video&fullscreen=true&volume=100&file={$flvUrl}&image={$imgUrl}" />
OUT;

// Add our own player into the player div
$input = preg_replace('#<div id="watch-noplayer-div">#', '<div id="watch-noplayer-div">' . $html, $input, 1);
$input = preg_replace('#http://s.ytimg.com/yt/swf/watch-vfl106690.swf#s', '' . $flowPlayerUrl . '', $input, 1);
$input = preg_replace('#http://s.ytimg.com/yt/swf/watch_v8-vfl106690.swf#s', '' . $flowPlayerUrl . '', $input, 1);

break;
}

return $input;
}
?>

Anyone else have any experience with this problem, or Glype in general?

Your welcome to take a look at the problem if you want, the URl is http://cameronsprivates.com
User: Support (capital letter required)
Pass: forums
Reply


Messages In This Thread
Youtube plugin not working (proxy) - by Extasey - 10-23-2009, 02:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Me Convert VBB plugin to MyBB plugin! XEMIT 0 1,059 02-12-2016, 04:23 AM
Last Post: XEMIT
  Need help with my MyBB plugin Laughynose 5 1,535 06-02-2011, 05:26 PM
Last Post: Sam

Forum Jump:


Users browsing this thread: 3 Guest(s)