How to play Google Drive videos with Video.js player

The script using to grab google drive streaming links, GetLinkDrive API response JSON string and we'll use it as video source of Video.js.

$link = '';
$api = ''.$link;
$sources = curl($api);
function curl($url)
    $ch = @curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    $head[] = "Connection: keep-alive";
    $head[] = "Keep-Alive: 300";
    $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
    $head[] = "Accept-Language: en-us,en;q=0.5";
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
    curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
    $page = curl_exec($ch);
    return $page;
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<link href="" rel="stylesheet">
<link href="" rel="stylesheet">
<div id="player" style="width: 100%;height: 100%">
<video id="video" class="video-js vjs-default-skin"></video>
<script type="text/javascript">
videojs('video', {
    width: 'auto',
    height: 'auto',
    controls: true,
    plugins: {
      videoJsResolutionSwitcher: {
        default: 480,
        dynamicLabel: true
}, function(){
    var player = this;
    window.player = player
    player.updateSrc(<?php echo $sources; ?>)
    player.on('resolutionchange', function(){'Source changed to %s', player.src())

If you want to get the script GetLinkDrive API, let contact:

Email: [email protected]

Skype: [email protected]