Using a recent G3 build from github (couple days old), I noticed an odd error in G3 when visiting any videos that were restricted to registered users. The Flowplayer would initialize but the video would never start. If you navigate away from the page and return or simply hit refresh, the video player would load as would the video and everything was fine.
Here are the steps to reproduce:
1. Upload an mp4 file to G3
2. Restrict access to the mp4 file
3. Login and attempt to watch the mp4
After running with firebug and turning debug on in Flowplayer, I noticed some strange error messages that suggested the clip duration was not loading. After a little debuging, I found that adding the Content-length header before sending the file via the proxy appears to fix this issue.
If someone else has this problem. you can add one extra line to modules/gallery/controllers/file_proxy.php:
// Dump out the image. If the item is a movie, then its thumbnail will be a JPG.
if ($item->is_movie() && $type != "albums") {
header("Content-type: image/jpeg");
} else {
header("Content-Type: $item->mime_type");
}
header("Content-Length: " . filesize($file));
Kohana::close_buffers(false);
$fd = fopen($file, "rb");
fpassthru($fd);
fclose($fd);
When streaming H264 mp4 video files, it makes sense that Flowplayer would want the Content-Length.
Of course, you do not see this problem if you have a public video because you do not go through the file proxy. In that case, Apache serves up the file to Flowplayer.
Posts: 16503
Please file a bug for this:
https://sourceforge.net/apps/trac/gallery/newticket
Registration on SourceForge is free.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 25945
rlparadise,
good detective work. Please post the bug url when you create it as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 65
Ticket Created:
https://sourceforge.net/apps/trac/gallery/ticket/974