使谷歌驱动器fmt流地图流链接在服务器上加载时工作

When I attempt to access video links on my google drive via my server, using via fmt map, they are not working on the client side because of ip tracking.

I have researched all stackoverfow similar topics but there is no solution.

you can check this for reference :

https://www.digitalocean.com/community/questions/google-get-video-fmt-stream-map

I know it's all about ip adresse so how some people make this works ? Regards.

This answer is not the final solution but it can hopefully bring some new info.

I have tried two ways already. One PHP from the site you suggested and one Javascript.

PHP gives me a link that has similar parameters as a working link that I got from browser developer tools so it could work. The problem as you say is IP because through PHP there is IP of the server and the rest is generated upon that. So I have tried to stream it through PHP to use the same IP address by readfile()

/*code follows code from the link*/
$gdrive = new gdrive;
$drive_link = 'https://drive.google.com/open?id=videoID';
$gdrive->getLink($drive_link);

$theFile = json_decode( $gdrive->getSources() , true );
//echo $theFile[0]['src'];
/*header('Content-Type: video/mp4');
header('Accept-Ranges: bytes');
header('Content-Length:'.filesize($theFile[0]['src']));*/

readfile($theFile[0]['src']);

but it doesn't work anyway. I don't know if that is right way or if there is another google security obstacle?

From Javascript, when trying to request docs.google.com/get_video_info or drive.google.com/file/d/videoID/view, it gives me a CORS Cross-Origin error (in Web Console) that I can't resolve.