Como reproduzir videos de 1080P do facebook no JWPLAYER
Ola gostaria de saber se e possível executar qualidade de vídeo de 1080P do player do Facebook no jwplayer. O código abaixo só permite reproduzir videos de ate 720P, a alguma forma de aperfeiçoar esse código abaixo, para que ele permita reproduzir videos de ate 1080P.
index.php
<?php
error_reporting(0);
$url= $_GET['link'];
if($url == NULL){
}
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) curlrome/37.0.2062.124 Safari/539.96');
$page = curl_exec($curl);
curl_close($curl);
$facebook = '/sd_src_no_ratelimit(.*?)",/s';
if(preg_match($facebook,$page,$sd))
$sd = str_replace(array('sd_src_no_ratelimit:'), array(''), $sd[0]);
$facebook = '/sd_src:"h(.*?)",/s';
if(preg_match($facebook,$page,$sd2))
$sd2 = str_replace(array('sd_src:'), array(''), $sd2[0]);
$facebook = '/hd_src_no_ratelimit(.*?)",/s';
if(preg_match($facebook,$page,$hd))
$hd = str_replace(array('hd_src_no_ratelimit:'), array(''), $hd[0]);
$facebook = '/hd_src:"h(.*?)",/s';
if(preg_match($facebook,$page,$hd2))
$hd2 = str_replace(array('hd_src:'), array(''), $hd2[0]);
$facebook = '/image" content(.*?)meta property/s';
if(preg_match($facebook,$page,$poster))
$poster = str_replace(array('image"','content=','meta property','/><',' "https','&'), array('','','','','"https','&'), $poster[0]);
print 'image: '.$poster.', sources: [';
if($sd == NULL){
unset($sd);
}else{
print '{file: '.$sd.' label: "240p"},';
}
if($sd2 == NULL){
unset($sd2);
}else{
print '{file: '.$sd2.' label: "360p"},';
}
if($hd2 == NULL){
unset($hd2);
}else{
print '{file: '.$hd2.' label: "480p"},';
}
if($hd == NULL){
unset($hd);
}else{
print '{file: '.$hd.' label: "720p"},';
}
echo '],';
?>
j
jwplayer.php
<head>
<script src="https://content.jwplatform.com/libraries/fNkNmTXG.js"></script>
<div id="picasa" class="picasa"></div>
<script type="text/javascript">
var playerInstance = jwplayer("picasa");
playerInstance.setup({
id:'picasa',
controls: true,
displaytitle: true,
flashplayer: "jwplayer.flash.swf",
width: "100%",
height: "100%",
aspectratio: "16:9",
fullscreen: "true",
primary: 'html5',
provider: 'http',
autostart: false,
<?php require('index.php'); ?>
});
</script>
<style>
.error{ color: #a5a5a5;
font-style: italic;
font-weight: 200;
}
</style>
<style type="text/css">
body{padding: 0; margin: 0;background: #000}
.jwplayer.jw-flag-aspect-mode, .video-js {width:100% !important; height: 100% !important}
#player{text-align: center;color:#fff;}
</style>
</head>
<div hidden><script id="_waucv7">var _wau = _wau || []; _wau.push(["classic", "z35v4xgedb66", "cv7"]);
(function() {var s=document.createElement("script"); s.async=true;
s.src="//widgets.amung.us/classic.js";
document.getElementsByTagName("head")[0].appendChild(s);
})();</script></div>
</html>
phpDiscussão (0)
Carregando comentários...