我正在使用一种技术来阻止我的用户下载带有临时链接的视频,但问题是当我在源标记中提供视频加载的链接但不能滚动时(例如:从0:00到1:25)这就是我的索引页面的代码,其中创建了视频元素并附加了链接

<?php 
include_once('dbconfig.php');

function mysql_date($time, $opt = ''){
    switch($opt){
        case 0:
            //Return datetime
            return date('Y-m-d H:i:s', $time);
            break;
        default:
            //Return default date
            return date('Y-m-d', $time);
    }
}

function generate_link($filename){
    $id = uniqid();

    $timestamp = mysql_date(time(), 0);

    $query = mysql_query('INSERT INTO `temporary_links`(`filename`, `token`, 
`timestamp`) VALUES ("' . $filename. '", "' . $id. '", "' . $timestamp . 
'")');

    return 'stream.php?i=' . $id;
}
?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Stream</title>
</head>
<body>
    <video width="600" height="300" controls>
        <source src="<?php echo generate_link('music.mp4'); ?>" 
type="video/mp4">
    </video>

    <video width="600" height="300" controls preload="none">
        <source src="music.mp4" type="video/mp4">
    </video>
</body>
</html>

然后这是读取视频文件的文件

<?php 
include_once('dbconfig.php');

if(isset($_GET['i']) && !empty($_GET['i'])){
    $id = $_GET['i'];

    $filename_query = mysql_query('SELECT `filename`, `token` FROM `temporary_links` WHERE `token`="' . $id . '"');

    if(mysql_num_rows($filename_query) > 0){
        $filename = mysql_fetch_assoc($filename_query);

        $filename = $filename['filename'];

        destroy_link($id);

        if(file_exists($filename)){
            ob_get_clean();

            header("Content-Type: video/mp4");
            header("Cache-Control: no-cache");
            header("Content-Length: " . filesize($filename));

            readfile($filename);

            ob_flush();
            flush();
            exit;
        }
    }else{
        header("HTTP/1.0 404 Not Found");
        exit;
    }
}

function destroy_link($id){
    return mysql_query('DELETE FROM `temporary_links` WHERE `token`="' . $id . '"');
}
?>

视频再次加载完美但不能跳过例如(0:00到1:20) . 预先感谢您的任何帮助 .