Reputation: 394
My code
function get_signed_player($videokey,$playerkey) {
$path = "players/".$videokey."-".$playerkey.".js";
$expires = round((time()+3600)/300)*300;
$secret = "xxxxxxxxxxxxxxxxxxxxx";
$signature = md5($path.':'.$expires.':'.$secret);
$url = 'http://cdn.jwplayer.com/'.$path.'?exp='.$expires.'&sig='.$signature;
return $url;
};
echo "<p>Watch this cool video:</p>";
echo "<script type='text/javascript' src='".get_signed_player('xxxxxxx','xxxxxx')."' width=\"100%\"></script>";
It's working fine. But, it's coming in fixed width.
How can I make it full width and responsive?
Can you help, please
Upvotes: 0
Views: 343
Reputation: 249
Your players/
URL is loading a single-line JW Player embed that takes on all the characteristics of your player as defined in your JW dashboard. You have two options:
1) Edit the cloud-hosted player with player ID $playerkey
in the JW dashboard to have desired responsive width and aspect ratio
2) Completely change your JW Player embed method to be completely manual:
libraries/
endpointPlease see their documentation at https://developer.jwplayer.com/jw-player/docs/developer-guide/getting-started/add-an-html5-player/ for more details.
Upvotes: 0