ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
~~~ <?php header('Access-Control-Allow-Origin: *'); //$url = config('app.rtmp')?:'http://srs.wstaichi.com/:8080/live'; $url = "http://srs.wstaichi.com:8080/live/"; $uri = $url.$_GET['g'].'.m3u8'; ?> <!DOCTYPE html> <html> <head> <title></title> <link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet"> <script src="https://unpkg.com/video.js/dist/video.js"></script> <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script> <style> body{ margin:0; padding:0; } </style> </head> <body> <video width="<?php echo config('app.video_w');?>" height="<?php echo config('app.video_h');?>" id="video" class="video-js vjs-default-skin" controls muted autoplay autobuffer > <source src="<?php echo $uri;?>" type="application/x-mpegURL"> </video> <script> var player = videojs('video'); player.src({ src: '<?php echo $uri; ?>', type: 'application/x-mpegURL', withCredentials: true }); player.play(); </script> </body> </html> ~~~