Jump to content

Getting video to a users browser


rondog

Recommended Posts

I have a mobile app. They visit a web site where they login. The videos live above web root, thus making it impossible for anyone to directly link to the video file. On iOS, I made a PHP script that checks if they are logged in first and if they are I use a range download method that acts like streaming. Works great! On android however, the script isn't working..lame.

 

So I was trying to think of other methods to deliver the video, but first checking if they are logged in. My idea was to check if they are logged in, if they are, copy the video from above web root to a temp directory in web root and give it a uniqid name and insert it into the DB. That ID will then expire after two hours and I would delete the video.

 

Ok that sounds like it would work for both phones, except with high traffic, that could be problematic.

 

My next idea was symlinks, but I don't know much about them other than they are a shortcut. Could I potentially use a symlink to give the logged in user a video file that lives above web root?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.