How to put UOL videos in JWplayer [closed]

1

Hello, I would like to know how I can get videos from the embed code of the UOL videos player and to work on JWPlayer . I found the code below, it in the case gets the url and converts with everything as url of UOL. Changed guidelines, but not working. Could someone help me with this.

The url of the video UOL.

The code to convert url :

<?php
    //----------------------------------------------------------------------------
    // FUNÇÃO CURL PARA URL FILE DISABLE - SIMPLE XML LOAD
    //----------------------------------------------------------------------------  

        function curlXML($url) {
            $ch = curl_init();
            curl_setopt ($ch, CURLOPT_URL, $url);
            curl_setopt ($ch, CURLOPT_HEADER, 0);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);       
            curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
            $data = curl_exec($ch);
            curl_close($ch);
            $xml = new SimpleXMLElement($data);

            return $xml;
        }
        // Verifico se existe no servidor a função curl.
        function carrega_xml ($url) {
            if (ini_get('allow_url_fopen')){
                $xml = simplexml_load_file($url);
            } else {
                $xml = $this->curlXML($url);
            }
            return $xml;
        }

        $video = carrega_xml('http://videolog.uol.com.br/swfs/related/related-player-publicididade.php?id_video='.$_GET['v']);
        echo $video->item->video;
        if ($video->item->video_hd){
            echo $video->item->video_hd;
        }
    ?> 

In the case, the above code also generates download link, but only needs it to work with the current url . Thank you in advance for your help.

" Someone could tell me some alternative way to get url of UOL videos, but to be able to put it in JWPlayer, if there is no solution to the operation of this code

. >     
asked by anonymous 02.05.2015 / 20:58

1 answer

1

I do not think it's necessary to php , and it's the same procedure to include youtube videos.

According to this indication of the JWPlayer support the procedure is as follows:

1 - Add the library inside the head tag

This is the default link, but you can also download the Self-Hosted version:

<script src="http://jwpsrv.com/library/YOUR_JW_PLAYER_ACCOUNT_TOKEN.js"></script>

YoushouldchangeYOUR_JW_PLAYER_ACCOUNT_TOKENtoyourtokenofJWPlayer(thislinkcanbefoundinyouruseraccount).

2-Includecodeembedwithintagbody

<divid="myElement"></div>

<script>
    jwplayer("myElement").setup({
        file: "http://www.youtube.com/watch?v=8CjdLYBDUqw",
        width: 640,
        height: 360
    });
</script>

For more details, see the tutorial on the JWPlayer page . / p>     

04.05.2015 / 02:20