How do I change the jwplayer 7 to jwplayer 8 please?

Started by traxpeliss, 03-20-2019

93
4
How do I change the jwplayer 7 to jwplayer 8 please?
  03-20-2019, 05:31 AM
#1
<? php
if (! definido ("JUICYCODES")) {
    salida;
}
utilizar IT \ Data;
utilizar IT \ JuicyCodes;

función template_header ($ preview = falso)
{
    $ components = array (
        "html" => '<script> jwplayer.key = "'. Data :: Get (" jwp_key "). '"; </script>',
        "stylesheets" => array ("juicycodes.css"),
        "javascripts" => array ("jwplayer.js", "juicycodes.js"),
    );
    devuelve $ componentes;
}

función template_body ($ source = array (), $ subtitle = false, $ preview = false, $ slug, $ dl = false)
{
    if (Data :: Get ("trust") == "incrustar" && is_string ($ source ["0"])) {
        return '<div class = "embed-container"> <iframe src = "'. $ source [" 0 "]. '" frameborder = "0" allowfullscreen = "allowfullscreen"> </iframe> </div>';
    }
    $ html = '<div id = "video_player"> </div>';
    $ script = '
    var player = jwplayer ("video_player");
    var config = {
        width: "'. Data :: Get (" width ").'",
        height: "'. Data :: Get (" height ").'",
        aspectratio: "'. Data :: Get (" aspect_ratio ").'",
        autostart: ' . Data::Get("autostart") . ',
        controls: ' . Data::Get("player_controls") . ',
        primary: "' . Data::Get("primary") . '",
        abouttext: "' . Data::Get("about_text") . '",
        aboutlink: "' . Data::Get("about_link") . '",
        image: "' . $preview . '",
        sources: ' . json_encode($source, JSON_UNESCAPED_SLASHES) . ',
        tracks: ' . json_encode($subtitle, JSON_UNESCAPED_SLASHES) . ',
        logo: {
            file: "' . Data::Get("logo") . '",
            link: "' . Data::Get("about_link") . '",
            position: "top-left",
        },
        captions: {
            color: "' . Data::Get("font_color") . '",
            fontSize: "' . Data::Get("font_size") . '",
            fontFamily: "' . Data::Get("font_family") . '",
            backgroundColor: "' . Data::Get("bg_color") . '",
        }
    };
    ';
    if (Data::Get("share_btn") == "on") {
        $script .= 'config.sharing = {sites: ["facebook","twitter","email","googleplus","reddit"]};';
    }
    $script .= "player.setup(config);";
    if ($dl) {
        $script .= '
        player.addButton(
            "' . Data::Get("url") . '/templates/jwplayer/assets/download.svg",
            "Download Video",
            function() {
                window.open("' . Data::Get("url") . '/' . Data::Get("download_slug") . '/' . $slug . '/","_blank");
            },
            "download"
        );
        ';
    }
    $html .= '<script type="text/javascript">' . JuicyCodes::Encrypt($script) . '</script>';
    return $html;
}

function template_footer($pop_ad = false, $pop_ad_code = false, $banner_ad = false, $banner_ad_code = false)
{
    $html = null;
    if ($banner_ad) {
        $html .= '
            <div class="banner" id="banner">
                <span class="close" onclick="return JuicyCodes.Close(); ">X</span>
                ' . $banner_ad_code . '
            </div>
        ';
    }
    if ($ pop_ad) {
        $ html. = $ pop_ad_code;
    }
    if (JuicyCodes :: GetError ()) {
        $ html. = '<script> JuicyCodes.Log ("'. JuicyCodes :: GetError (). '"); </script> ';
    }
    devuelve $ html;
}


#0


[-]
No Permission
You cannot reply or view replies as a guest.

Create an Account

Create a free account today and get all features available. It only takes a few seconds.

Log In

Log into an existing account.


« Next Oldest | Next Newest »




1 Guest(s)