Exemplo n.º 1
0
function clipsergeneratevideodownloadlink($video_url)
{
    $mosConfig_absolute_path = $GLOBALS['mosConfig_absolute_path'];
    $mosConfig_live_site = $GLOBALS['mosConfig_live_site'];
    require_once "{$mosConfig_absolute_path}/administrator/components/com_jomtube/includes/jomtube_getflv.php";
    $flvlink = api_getflv($video_url);
    return $flvlink;
}
Exemplo n.º 2
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;
}