Play video in mysql BLOB

1

Hello, I'm creating a site for uploads, and I packed a part, it's not professional I'm just testing my knowledge and training. My problem is the following, I need to make an efficient way for the video blob of the database to be played on mine without bogging the progress bar like this: link

Or you have to download the whole file and then play it as in a DataURI ...

One solution I had thought was that creating a blob URI would serve for all people, but it expires after the session closes and becomes invalid.

So, can you help me?

My current test code is:

<?php
$id = $_GET['id'];

header('Content-Type: video/mp4');
$servidor = 'playex.link.mysql';
$usuario = 'playex_link';
$senha = '*******';
$banco = 'playex_link';

$mq = new mysqli($servidor, $usuario, $senha, $banco);

$sel = 'SELECT * FROM Videos WHERE vid=' . $id ;
$re = $mq->query($sel);

while($row = $re->fetch_assoc()){
    print $row["q720"];
}

$mq->close();
?>
    
asked by anonymous 07.05.2017 / 22:38

0 answers