我正在使用 videoJS 库间接播放视频。
HTML:
<video id='example_video_1' class='video-js vjs-default-skin' controls preload='auto' poster='oilfield.jpg' >
<source src='media.php?name=video.mp4' type='video/mp4' />
</video>
媒体.php PHP:
$the_file = "{$_SERVER['DOCUMENT_ROOT']}/{$_GET['name']}";  
    if( file_exists( $the_file ) )
    { 
      readfile( $the_file ); 
      exit;
    }  
我对图像 src 做了同样的事情,效果很好,但似乎视频不接受数据。
有人有想法么?