How to get URL of the video from JwPlayer API using PHP?

704 views Asked by At

All I want is to get the url of the video I stored, not the playists.

I was able to store video in JW Server but I don't know how to get them in any certain way.. I'm using JwPlayer PHP Library for that..

https://github.com/jwplayer/jwplatform-php/

What I've done so far:

$jwplatform_api = new  
Jwplayer\JwplatformAPI($jwplatform_api_key,$jwplatform_api_secret);

$target_file = 'demo.mp4';
$params = array();
$params['title'] = 'Nobita';
$params['description'] = 'Nobita';
$params['link'] = "http://digitalrace.in/rl/";

I thought, using the url "digitalrace.in/rl/" I could get the video, But all I got was 403 Forbidden...

I know, there's a way by using the PHP Library, but it's not giving me much satisfaction as anyone could download the vdeo if I use that url and there's no safety and no styling at all and I didn't find that below url in JW Docs anywhere.(PHP Library)

<a href="http://content.jwplatform.com/previews/<?php echo $video_key?>-AKJ8XQCI"

How do I get url of the video, So I can link the video with course..I thought of using Javascript, but don't know how to get video in it...

<div class="container" onclick="play()" id="myElement">
    Preview
</div>


<script type="text/JavaScript">
function play() {
    jwplayer("myElement").setup({
        "playlist": "https://cdn.jwplayer.com/v2/playlists/JVUXKS1y",
        "file": "myVideo" //**I want my video here, by grabbing it's url somehow which I don't know how to get**..
        "height": 360,
        "width": 640,
        "nextUpDisplay": true,
    });
}

0

There are 0 answers