Hej,
I have a problem to look videos at ipad/iphone with gallery. On windows with firefox all is fine but with ipad the video does not start. I get only a error picture.
But if i used the direct link, for example from the upload folder, all is fine on ipad. Only with using gallery they dont show the videos.
Anybody any idea?
Regards
Sebastian
Posts: 27300
http://www.langleycom.com/gallery3/index.php/Movies-/Preview
Works on mine.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Hej thanks for the hint. I have checked now many things. First idea was frame rate. In Europe normal 25fps, but apple, you never know what they do. So ecoding with 29,97fps, same error.
To show that, i have added a public album, added both vids, look, and it works.
http://www.familiealbert.com
Username: tester
Password: tester
The public folder works on my ipad, but the hidden folder you only see after login, dont work on the ipad.
I just dont understand why. But i need it. We want to make an online album from our wedding with fotos and videos. But not for everyone on the world.
Regards
Sebastian
Posts: 10
I found another topic with exactly the same problem but without a solution.
http://galleryproject.org/node/107119
Posts: 27300
I see now and can reproduce.
Might be a flowplayer thing. Will have to play around a bit.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Ok i'm not to stupid to configure that.
Thank you very much.
Posts: 27300
Works fine with Safari on windows.
Does not work with ipad and the JWplayer module that replaces the flowplayer player.
Could be some ipad thing.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8339
iDevices need BYTE RANGE support. http://galleryproject.org/node/105336
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 27300
suprsidr,
thanks for looking into this but here is the issue; guest viewable items work fine on the ipad and other OS/browser combos:
http://www.langleycom.com/gallery3/index.php/Movies-
Now, login using U: fred P: fredfred
Now you will see another album that had permissions set with the same videos.
This protected albums videos work with other OS/browser combos but not the ipad.
I'm no server/firewall expert but I think that the headers sent with the video might be different than those items not in a protected album. Just a guess though.
Ideas?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Hej
Is it possible to set an alternative direkt link? Not download. While if i used the direkt link the video works.
BR
Sebastian
Posts: 27300
Yes we could detect ipad using JS or php, using userAgent.
But before we go down that road does it work on iphone? It is does or does not then it changes the JS/PHP userAgent detection code.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Yes, its the same at me with iphone 4 and ipad 2.
Posts: 27300
I don't have my ipad with me now to test so here is something to get you started:
<?= html::anchor($item->file_url(true), t("Click here to download item.")); ?>
will give you a link to the item on the filesystem.
This I can't test but you can try:
These code snipits can be added to the themes movie.html.php file in the view folder.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Hej,
i'm not sure where to add the code. I'm not really expert in php things.
The code from movie.html.php is like follow:
I think directly in front of all in first line?
I think, there was to much stress yesterday. I have rechecked my idea with direkt link. It also only works on non hidden folders. Forget the idea.
Posts: 10
I think i have a quick solution for me. Have deleted the htaccess file in Video folder, and now it works. Without login you dont see the folder, and nobody will know the direct link to that folder and the exact filename.
But i dont know if he only added the htaccess while i create the album, or every time i make any changes in it. I will see it. Not the best solution but it works. So it seems its something with htaccess.
Posts: 183
Hey guys,
Coincidentally, I *just* tracked down the same problem for Gallery 3.1... good news: this is 100% solved for Gallery 3.1!
@suprsidr - you're right, it's byte-range support. Unfortunately, Apple's browsers *demand* its support, even if responses without "Accept-Ranges" headers or 206 statuses are received (which kinda violates HTTP standards, but oh well).
@floridave - the public links work because they don't use Gallery's file_proxy controller. They're served directly by the server's file system, which supports the "Range" header. Private links are served via Gallery 3.0.x's file_proxy controller, which ignores the "Range" header completely.
@sebsa - the reason it works with htaccess removed is because you've removed Gallery's file_proxy from the loop, making all of the files in there public. Anyone with the link can navigate there without access restrictions.
BTW, the same info applies to videos via Gallery's REST - Gallery 3.0.x doesn't support byte-range requests, but Gallery 3.1 does. And FWIW, Kohana 3 made it pretty painless to implement
Take care,
Shad
Posts: 814
shad, thanks for the excellent write up on this! Good to know it's 'fixed' in 3.1. Appreciate it!
Posts: 10
Great news. Thx a lot. Last question: When is release date? :D
Posts: 32
shadlaws: Are you sure it's fixed in 3.1? I've been looking at the code changes for master in github, and can see how mediaelement.js has been implemented (good choice!) I went to as far as port the code changes for this particular feature into my vanilla G3 3.0.9 installation. I now have html5 mediaelements.js video being served from my secure albums, and works great on all computer based browsers, but it doesn't want to work on iPhone/iPad.
I believe the problem still exists due to the file_proxy as when I remove the .htaccess file, the problem goes away. But for the life of me (and I spent a few hours now) I can't find the file_proxy or related fixes to get streaming on iOS to work correctly so I can merge those changes into my installation.
Are you sure 3.1 is fixed? Can you point me to the right direction? What file / date or defect was the fix dropped under?
Posts: 32
No reply.. or no one is using G3 with iOS.
I was trying to figure out the failure, and I narrowed it down, but I'm at a dead end (using tcpdump & wireshark while walking the code).
For some reason, iOS sends 2 GET /gallary3/var/.../myvideo.mp4?m=12345678 type requests, one after another. In both cases, G3 fails in file_proxy.php in the following location:
// Make sure we have access to the item
if (!access::can("view", $item)) {
$e = new Kohana_404_Exception();
$e->test_fail_code = 4;
throw $e;
}
The failure occurs in access.php under user_can. For some reason, it falls right through and returns false. Anyone got G3 with video working on iOS?
Posts: 27300
http://www.langleycom.com/gallery3/index.php/Example-video
Works for me on the ipad. Apple does not allow autoplay. So you have to click the center play triangle and then the play triangle in the lower left. Not sure why.
Permissions is a different issue. When iOS device make a request for a video, they don't download the whole video. They download only small chunk at a time, to minimize bandwidth usage, and also because the user may want to skip to a later portion of the video without downloading the previous parts.
G3s file_proxy controller needs to have byte-range support added.
if your willing to get your hands dirty this might help:
http://forums.phpfreaks.com/topic/229190-php-video-proxy-for-mobile/
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team