iam playing flv videos in my site, using flowplayer, and i dont want the users to know the actual path of the video, so that they cant download them. But onmouseover on the video, the video path is visible in the statusbar (in FireFox), for ex: http://www.example.com/videos/123.flv
So if the user goes开发者_StackOverflow中文版 to the directory (videos), he can view the videos and can download them. So i put an empty index.html file there, now the video list is not displayed. :)
But still, if the user enters the complete path in the url, the video can be downloaded. (shows the download dialog box). This is my worry. So i added the following lines in my .htaccess file.
<files ~ ".flv$"> order deny,allow allow from none deny from all </files>
Now the problem is that, the flowplayer is not able to play the video.
So how can i restrict access to the video on the browser, and allow access only to flowplayer?
The short answer is that you can't. The data has to arrive on the user's computer before it can be played.
You could try to modify the player so that it sends additional HTTP headers, and deny access without them, but:
- The user could sniff the traffic and find out what they are anyway
- If you could modify the player, you would have removed the code to show the URL by now anyway
精彩评论