Exemplo n.º 1
0
function blipembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 1;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->video_repeat == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        // ###########################################################
        // ###### LOAD BLIP.TV API FROM SNOOPY CLASS
        // ###########################################################
        include "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/Snoopy.class.php";
        $snoopy = new Snoopy();
        $video_ID = $video_detail->remote_id;
        $snoopy->fetch("http://blip.tv/file/" . $video_ID . "?skin=api");
        $strAPI = $snoopy->results;
        // ###########################################################
        // ###### GET FLV DIRECT LINK
        // ###########################################################
        $start_position = strpos($strAPI, "<link type=\"video/x-flv\" href=\"") + 31;
        $end_position = strpos($strAPI, "\" />", $start_position) - $start_position;
        $FLVlink = substr($strAPI, $start_position, $end_position);
        ?>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  '<?php 
        echo $FLVlink;
        ?>
',
        'type':                                  'video',
		'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
		'controlbar':							 'over',
        'stretching':                            'fill',
        'frontcolor':                            'ffffff',
        'lightcolor':                            'ff6600',
        'autostart':                            <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always'
      };

      var attributes =
      {
        'name':                                  'JomPlayerId1',
        'id':                                    'JomPlayerId1'
      };

      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
    </script>

<?php 
        $jwplayer_embed = "<div id=\"JomPlayerContainer\" class=\"JomPlayerContainer\">\r\n\t      \t\t\t\t<a id=\"JomTubePlayerId1\" class=\"player1\" href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">Get the Adobe Flash Player to see this video.</a>\r\n\t    \t\t\t  </div>\r\n\t\t\t\t\t  ";
        return $jwplayer_embed;
    }
    // ###########################################################
    // ###### BLIP.TV DEFAULT EMBEDED PLAYER SETTINGS
    // ###########################################################
    if ($local != "1" or $unexpectederror == "1") {
        // ###########################################################
        // ###### LOAD BLIP.TV API FROM SNOOPY CLASS
        // ###########################################################
        include "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/Snoopy.class.php";
        $snoopy = new Snoopy();
        $video_ID = $video_detail->remote_id;
        $snoopy->fetch("http://blip.tv/file/" . $video_ID . "?skin=api");
        $strAPI = $snoopy->results;
        // ###########################################################
        // ###### GET FLV DIRECT LINK
        // ###########################################################
        $start_position = strpos($strAPI, "<link type=\"video/x-flv\" href=\"") + 31;
        $end_position = strpos($strAPI, "\" />", $start_position) - $start_position;
        $FLVlink = substr($strAPI, $start_position, $end_position);
        // ###########################################################
        // ###### EXTERNAL PLAYER EMBED SOURCE CODE FROM PROVIDER
        // ###########################################################
        $embedvideo = "\r\n\t\t<embed width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" allowfullscreen=\"true\" allowscriptaccess=\"always\" type=\"application/x-shockwave-flash\" src=\"http://blip.tv/scripts/flash/showplayer.swf?showplayerpath=/scripts/flash/showplayer.swf&feedurl=http%3A//subfightercom.blip.tv/rss/flash&brandname=Subfighter.tv&brandlink=http%3A//www.subfighter.tv&enablejs=true&allowm4v=true&preferredRole=Web&tabType2=guide&tabType1=guide&tabType3=guide&file=http%3A//subfightercom.blip.tv/rss/flash&showsharebutton=false&tabTitle1=Episodes&tabUrl1=http%3A//subfightercom.blip.tv/rss/flash&tabTitle2=Popular&tabUrl2=http%3A//subfightercom.blip.tv/rss/flash/%3Fsort%3Dpopular&tabTitle3=Episodes&tabUrl3=http%3A//subfightercom.blip.tv/rss/flash/%3Fsort%3D%7Edate&showguidebutton=false&file=" . $FLVlink . "&autostart=true\"/>\r\n\t\t";
    }
    return $embedvideo;
}
Exemplo n.º 2
0
function clipserembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 0;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->video_repeat == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        // ###########################################################
        // ###### LOAD CLIPSER PAGE FROM SNOOPY CLASS
        // ###########################################################
        include "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/Snoopy.class.php";
        $snoopy = new Snoopy();
        $video_ID = $video_detail->remote_id;
        $snoopy->fetch("http://www.clipser.com/pathget_fileembed.php?vid=" . $video_ID . "");
        $strAPI = $snoopy->results;
        //		return $strAPI;
        // ###########################################################
        // ###### GET FLV DIRECT LINK
        // ###########################################################
        $start_position = strpos($strAPI, "&file=") + 6;
        $end_position = strpos($strAPI, ".flv", $start_position);
        $FLVlink = substr($strAPI, $start_position, $end_position + 4);
        //		echo "url test= ".$FLVlink;
        ?>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  '<?php 
        echo $FLVlink;
        ?>
',
        'type':                                  'video',
		'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
		'controlbar':							 'over',
        'stretching':                            'fill',
        'frontcolor':                            'ffffff',
        'lightcolor':                            'ff6600',
        'autostart':                            <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always'
      };

      var attributes =
      {
        'name':                                  'JomPlayerId1',
        'id':                                    'JomPlayerId1'
      };

      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
    </script>

<?php 
        $jwplayer_embed = "<div id=\"JomPlayerContainer\" class=\"JomPlayerContainer\">\r\n\t      \t\t\t\t<a id=\"JomTubePlayerId1\" class=\"player1\" href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">Get the Adobe Flash Player to see this video.</a>\r\n\t    \t\t\t  </div>\r\n\t\t\t\t\t  ";
        return $jwplayer_embed;
    }
    if ($local != "1" or $unexpectederror == "1") {
        $embedvideo = "<object width=\"" . $videowidth . "px\" height=\"" . $videoheight . "\"><param name=\"movie\" value=\"http://www.clipser.com/Play?vid=" . $vcode . "&autostart=true\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.clipser.com/Play?vid=" . $vcode . "&autostart=true\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"" . $videowidth . "px\" height=\"" . $videoheight . "px\"></embed></object>";
    }
    return $embedvideo;
}
Exemplo n.º 3
0
function googleembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 1;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->video_repeat == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        // ###########################################################
        // ###### LOAD CLIPSER PAGE FROM SNOOPY CLASS
        // ###########################################################
        //		include("$mosConfig_absolute_path/administrator/components/com_jomtube/includes/Snoopy.class.php");
        //		$snoopy = new Snoopy;
        $video_ID = $video_detail->remote_id;
        //		$snoopy->fetch("http://keepvid.com/?url=http://video.google.com/videoplay?docid=".$video_ID."");
        //		$strAPI = $snoopy->results;
        //		return $strAPI;
        // ###########################################################
        // ###### GET FLV DIRECT LINK
        // ###########################################################
        //		$start_position = strpos($strAPI, "Links found on");
        //		$start_position = strpos($strAPI, "Report any problems to", $start_position);
        //		$start_position = strpos($strAPI, "<a href=\"", $start_position)+9;
        //		$end_position = strpos($strAPI, "\"", $start_position)-$start_position;
        //		$getflvlink = substr($strAPI, $start_position, $end_position);
        //		$end_position = strpos($getflvlink, "\");
        //		$getflvlink = substr($getflvlink, 0, $end_position);
        //		$FLVlink = trim($getflvlink);
        //		echo "url from keepvid = ".$FLVlink."";
        $FLVlink = "" . $mosConfig_live_site . "/administrator/components/com_jomtube/plugins/videoserver/jwscript/Google_URI.php?docid=" . $video_ID . "&type=flv";
        ?>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  '<?php 
        echo $FLVlink;
        ?>
',
        'type':                                  'video',
		'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
		'controlbar':							 'over',
        'stretching':                            'fill',
        'frontcolor':                            'ffffff',
        'lightcolor':                            'ff6600',
        'autostart':                             <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always'
      };

      var attributes =
      {
        'name':                                  'JomPlayerId1',
        'id':                                    'JomPlayerId1'
      };

      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
    </script>

<?php 
        $jwplayer_embed = "<div id=\"JomPlayerContainer\" class=\"JomPlayerContainer\">\r\n\t      \t\t\t\t<a id=\"JomTubePlayerId1\" class=\"player1\" href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">Get the Adobe Flash Player to see this video.</a>\r\n\t    \t\t\t  </div>\r\n\t\t\t\t\t  ";
        return $jwplayer_embed;
    }
    if ($local != "1" or $unexpectederror == "1") {
        // ##################################################
        // ########### USE EMBED VIDEO
        // ##################################################
        $embedvideo = "\t<embed id=\"VideoPlayback\" src=\"http://video.google.com/googleplayer.swf?docid=" . $vcode . "&autoplay=true&hl=en&fs=true\" style=\"width:" . $videowidth . "px;height:" . $videoheight . "px\" allowFullScreen=\"true\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\"> </embed>";
    }
    return $embedvideo;
}
Exemplo n.º 4
0
function revverembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 0;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // ##################################################
        // ########### GET DIRECT LINK TO FLV CREATE XML
        // ##################################################
        $cache_file = $mosConfig_absolute_path . $video_detail->directory . '/cache/' . $video_detail->video_type . '/' . $video_detail->id . '.xml';
        if (file_exists($cache_file)) {
            unlink($cache_file);
        }
        require "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/jomtube_getflv.php";
        $flvlink = api_getflv($video_detail->video_url);
        genXmlFile($video_detail, $flvlink);
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->auto_play_on_load == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        $jwplayer = "" . $mosConfig_live_site . "/components/com_jomtube/assets/swf/player.swf";
        $skin = "" . $mosConfig_live_site . "/components/com_jomtube/assets/swf/skins/{$jomtube_configs->jw_player_skin}.swf";
        $autostart = $repeat;
        // 'true' or 'false' -> starts video when page loads
        $vidstretching = "fill";
        // (none) no stretching, (exactfit), (uniform) stretch with black borders, (fill) uniform, but completely fill the display
        $display_thumb = $video_detail->display_thumb;
        $embedvideo = "\r\n\t<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" name=\"jomtube_player\"  width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" >\r\n\t<param name=\"allowscriptaccess\" value=\"always\" />\r\n\t<param name=\"wmode\" value=\"transparent\" />\r\n\t<param name=\"allowfullscreen\" value=\"true\" />\r\n\t<param name=\"movie\" value=\"" . $mosConfig_live_site . "/components/com_jomtube/assets/swf/player.swf\" />\r\n\t<param name=\"flashvars\" value=\"width=" . $videowidth . "&height=" . $videoheight . "&enablejs=true" . $longtail . "&file={$mosConfig_live_site}{$video_detail->directory}/cache/{$video_detail->video_type}/{$video_detail->id}.xml&image=" . $display_thumb . "&autostart=" . $autostart . "&stretching=" . $vidstretching . "&skin=" . $skin . "&{$repeat}&fullscreen=true\" />\r\n\r\n \t<embed id=\"jomtubeplayer\" name=\"jomtubeplayer\" src=\"" . $jwplayer . "\" flashvars=\"width=" . $videowidth . "&height=" . $videoheight . "&file={$mosConfig_live_site}{$video_detail->directory}/cache/{$video_detail->video_type}/{$video_detail->id}.xml&image=" . $display_thumb . "&autostart=" . $autostart . "&stretching=" . $vidstretching . "&skin=" . $skin . "&{$repeat}&fullscreen=true\" width=" . $videowidth . " height=" . $videoheight . " allowfullscreen=\"true\" allowscriptaccess=\"always\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" />\r\n\t</object>";
        return $embedvideo;
    }
    if ($local != "1" or $unexpectederror == "1") {
        $embedvideo = "<object width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" data=\"http://flash.revver.com/player/1.0/player.swf?mediaId=" . $vcode . "\" type=\"application/x-shockwave-flash\" id=\"revvervideo" . $vcode . "\"><param name=\"Movie\" value=\"http://flash.revver.com/player/1.0/player.swf?mediaId=" . $vcode . "\"></param><param name=\"FlashVars\" value=\"allowFullScreen=true&autoStart=true&backColor=#000000&frontColor=#FFFFFF&gradColor=#000000&relatedVideos=false&creatorVideos=false&shareUrl=embedUrl&pngLogo=http://static2.revver.com/player/logo/subfightertv_logo_.png\"></param><param name=\"AllowFullScreen\" value=\"true\"></param><param name=\"AllowScriptAccess\" value=\"always\"></param><embed type=\"application/x-shockwave-flash\" src=\"http://flash.revver.com/player/1.0/player.swf?mediaId=" . $vcode . "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" allowScriptAccess=\"always\" flashvars=\"allowFullScreen=true\" allowfullscreen=\"true\" width=\"" . $videowidth . "\" height=\"" . $videoheight . "\"></embed></object>";
    }
    return $embedvideo;
}
Exemplo n.º 5
0
function vimeoembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 0;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->auto_play_on_load == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        // ###########################################################
        // ###### LOAD API FROM SNOOPY CLASS
        // ###########################################################
        $geturl = $video_detail->video_url;
        // RETRIEVE video_url FROM THE DATABASE
        $keepvidurl = "http://keepvid.com/?url=" . $geturl . "";
        include "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/Snoopy.class.php";
        $snoopy = new Snoopy();
        $snoopy->fetch($keepvidurl);
        $strAPI = $snoopy->results;
        // ###########################################################
        // ###### GET FLV DIRECT LINK
        // ###########################################################
        $start_position = strpos($strAPI, "Links found on");
        $start_position = strpos($strAPI, "Report any problems to", $start_position);
        $start_position = strpos($strAPI, "<a href=\"", $start_position) + 9;
        $end_position = strpos($strAPI, "\"", $start_position) - $start_position;
        $getflvlink = substr($strAPI, $start_position, $end_position);
        $flv_link = trim($getflvlink);
        //		echo "url from keepvid = ".$flv_link.""; // TEST TO SEE THE RETRIEVED FLV LINK
        //		$flv_link = "http://www.vimeo.com/moogaloop/play/clip:2168002//67e8457815693fae47a79cdeec0a05dd/1236787200/video.flv?q=";
        // ##################################################
        // ########### JW PLAYER START IN JAVASECRIPT
        // ##################################################
        ?>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  '<?php 
        echo $flv_link;
        ?>
',
        'type':                                  'video',
		'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
		'controlbar':							 'over',
        'stretching':                            'fill',
        'frontcolor':                            'ffffff',
        'lightcolor':                            'ff6600',
        'autostart':                             <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always'
      };

      var attributes =
      {
        'name':                                  'JomPlayerId1',
        'id':                                    'JomPlayerId1'
      };

      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
    </script>

<?php 
        $jwplayer_embed = "<div id=\"JomPlayerContainer\" class=\"JomPlayerContainer\">\r\n\t      \t\t\t\t<a id=\"JomTubePlayerId1\" class=\"player1\" href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">Get the Adobe Flash Player to see this video.</a>\r\n\t    \t\t\t  </div>\r\n\t\t\t\t\t  ";
        return $jwplayer_embed;
    }
    if ($local != "1" or $unexpectederror == "1") {
        $embedvideo = "\r\n\t\t<object width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" ><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=" . $vcode . "&amp;server=subfighter.tv&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ff6600&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=" . $vcode . "&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ff6600&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" ></embed></object>\r\n\t\t";
    }
    return $embedvideo;
}
Exemplo n.º 6
0
function youtubeembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    $local_player = 1;
    //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        //	$FLVlink = "".$mosConfig_live_site."/administrator/components/com_jomtube/plugins/videoserver/jwscript/Google_URI.php?docid=".$video_ID."&type=flv";
        //	$FLVlink = "".$mosConfig_live_site."/administrator/components/com_jomtube/plugins/videoserver/jwscript/YouTube_Multi-Format.php?v=".$vcode."&fmt=6";
        // echo $FLVlink;
        ?>

    <script type="text/javascript">
      var flashvars =
      {
        'file':                                  encodeURIComponent('<?php 
        echo $mosConfig_live_site;
        ?>
/administrator/components/com_jomtube/plugins/videoserver/jwscript/YouTube_Multi-Format.php?v=<?php 
        echo $vcode;
        ?>
'),
        'type':                                  'video',
		'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
		'controlbar':							 'over',
        'stretching':                            'uniform',
        'frontcolor':                            'ffffff',
        'lightcolor':                            'ff6600',
        'autostart':                             <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
      };

      var params =
      {
        'allowfullscreen':                       'true',
        'allowscriptaccess':                     'always'
      };

      var attributes =
      {
        'name':                                  'JomPlayerId1',
        'id':                                    'JomPlayerId1'
      };

      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
    </script>

<?php 
        $jwplayer_embed = "<object width=\"" . $videowidth . "px\" height=\"" . $videoheight . "\"><param name=\"movie\" value=\"http://www.youtube.com/v/" . $vcode . "&autoplay=1&rel=0\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/" . $vcode . "&rel=0&autoplay=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"" . $videowidth . "px\" height=\"" . $videoheight . "px\"></embed></object>";
        return $jwplayer_embed;
    }
    if ($pos404 > 0) {
        $unexpectederror = "1";
    }
    if ($local != "1" or $unexpectederror == "1") {
        $embedvideo = "<object width=\"" . $videowidth . "px\" height=\"" . $videoheight . "\"><param name=\"movie\" value=\"http://www.youtube.com/v/" . $vcode . "&autoplay=1&rel=0\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/" . $vcode . "&rel=0&autoplay=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"" . $videowidth . "px\" height=\"" . $videoheight . "px\"></embed></object>";
    }
    return $embedvideo;
}
function dailymotionembed($video_detail, $jomtube_configs)
{
    $mosConfig_absolute_path = JPATH_SITE;
    $mosConfig_live_site = substr(JURI::base(), 0, strlen(JURI::base()) - 1);
    $vcode = jalemurldecode($video_detail->remote_id);
    // ##################################################
    // ########### USE VIDEO WIDTH, HEIGHT CONFIG FROM BACKEND
    // ##################################################
    if ($jomtube_configs->video_player_height > 0 and $jomtube_configs->video_player_width > 0) {
        $videowidth = $jomtube_configs->video_player_width;
        $videoheight = $jomtube_configs->video_player_height;
    }
    // ##################################################
    // ########### PARSE OUT VIDEO ID
    // ##################################################
    $start_position = strpos($vcode, "/video/") + 7;
    $remote_id = substr($vcode, $start_position);
    //      echo $remote_id; //TEST THE REMOTE ID PARSE
    // ###########################################################
    // ###### SCRAPE API VIDEO PAGE FROM SNOOPY CLASS
    // ###########################################################
    include "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/Snoopy.class.php";
    $snoopy = new Snoopy();
    $snoopy->fetch("http://www.dailymotion.com/rss/video/" . $remote_id . "");
    $strAPI = $snoopy->results;
    //     	echo $strAPI;
    //      echo "http://www.dailymotion.com/rss/video/".$remote_id."";
    // ##################################################
    // ########### TEST FOR video/x-flv FORMAT EXIST
    // ##################################################
    $start_position = strpos($strAPI, "<media:content url=\"http://www.dailymotion.com/get/");
    $start_positiontype = strpos($strAPI, "type=\"", $start_position) + 6;
    $end_position = strpos($strAPI, "\"", $start_positiontype) - $start_positiontype;
    $flvmediacontent = substr($strAPI, $start_positiontype, $end_position);
    // ########### GET FLVLINK
    if ($flvmediacontent == "video/x-flv") {
        $geturl = $video_detail->video_url;
        // RETRIEVE video_url FROM THE DATABASE
        $keepvidurl = "http://keepvid.com/?url=" . $geturl . "";
        $snoopy = new Snoopy();
        $snoopy->fetch($keepvidurl);
        $strAPI = $snoopy->results;
        $start_position = strpos($strAPI, "Links found on");
        $start_position = strpos($strAPI, "Report any problems to", $start_position);
        $start_position = strpos($strAPI, "<a href=\"", $start_position) + 9;
        $end_position = strpos($strAPI, "\"", $start_position) - $start_position;
        $getflvlink = substr($strAPI, $start_position, $end_position);
        $flv_link = trim($getflvlink);
        $local_player = 1;
        $flv_link = urlencode($flv_link);
        //		echo "url from keepvid = ".$flv_link.""; // TEST TO SEE THE RETRIEVED FLV LINK
        //		$flv_link = "http://www.dailymotion.com/get/18/320x240/flv/14563400.flv?key=bd1ad15be2789300a59344a527dfbac313ac4cf.flv";
    } else {
        // ##################################################
        // ########### EXTRACT VIDEO ID FOR DEFAULT EMBED PLAYER
        // ##################################################
        $snoopy = new Snoopy();
        $snoopy->fetch("http://www.dailymotion.com/rss/video/" . $remote_id . "");
        $strAPI = $snoopy->results;
        $start_position = strpos($strAPI, "<dm:id>") + 7;
        $end_position = strpos($strAPI, "</dm:id>", $start_position) - $start_position;
        $vcode = substr($strAPI, $start_position, $end_position);
        $local_player = 0;
        //		echo $vcode;
    }
    // ##################################################
    // ########### USE LOCAL PLAYER (WILL BE CONFIG IN BACKEND)
    // ##################################################
    //    $local_player = 1; //$local_player = $jomtube_configs->local_player
    if ($local_player == "1") {
        // #######################################################
        // #### BEHAVIOUR PARAMETERS FOR JW PLAYER
        // #######################################################
        if ($jomtube_configs->auto_play_on_load == "1") {
            $repeat = "repeat=true";
        } else {
            $repeat = "repeat=false";
        }
        // ##################################################
        // ########### JW PLAYER START IN JAVASECRIPT
        // ##################################################
        ?>

	    <script type="text/javascript">
	      var flashvars =
	      {
	        'file':                                  '<?php 
        echo $flv_link;
        ?>
',
	        'type':                                  'video',
			'skin':									 '<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/skins/<?php 
        echo $jomtube_configs->jw_player_skin;
        ?>
.swf',
			'controlbar':							 'over',
	        'stretching':                            'uniform',
	        'frontcolor':                            'ffffff',
	        'lightcolor':                            'ff6600',
	        'autostart':                             <?php 
        echo $jomtube_configs->auto_play_on_load;
        ?>
	      };

	      var params =
	      {
	        'allowfullscreen':                       'true',
	        'allowscriptaccess':                     'always'
	      };

	      var attributes =
	      {
	        'name':                                  'JomPlayerId1',
	        'id':                                    'JomPlayerId1'
	      };

	      swfobject.embedSWF('<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jomtube/assets/swf/player.swf', 'JomTubePlayerId1', '<?php 
        echo $videowidth;
        ?>
', '<?php 
        echo $videoheight;
        ?>
', '9.0.124', false, flashvars, params, attributes);
	    </script>

<?php 
        $jwplayer_embed = "<div id=\"JomPlayerContainer\" class=\"JomPlayerContainer\">\r\n\t\t      \t\t\t\t<a id=\"JomTubePlayerId1\" class=\"player1\" href=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\">Get the Adobe Flash Player to see this video.</a>\r\n\t\t    \t\t\t  </div>\r\n\t\t\t\t\t\t  ";
        return $jwplayer_embed;
    }
    // ###########################################################
    // ###### DEFAULT EMBEDED PLAYER SETTINGS
    // ###########################################################
    if ($local != "1" or $unexpectederror == "1") {
        // ##################################################
        // ########### USE EMBED VIDEO
        // ##################################################
        $embedvideo = "<object width=\"" . $videowidth . "\" height=\"" . $videoheight . "\"><param name=\"movie\" value=\"http://www.dailymotion.com/swf/" . $vcode . "&autoPlay=1\"></param><param name=\"allowfullscreen\" value=\"true\"></param><embed src=\"http://www.dailymotion.com/swf/" . $vcode . "&autoPlay=1&related=1\" type=\"application/x-shockwave-flash\" width=\"" . $videowidth . "\" height=\"" . $videoheight . "\" allowfullscreen=\"true\"></embed></object>";
    }
    return $embedvideo;
}