piyusharora420 Posted October 5, 2012 Share Posted October 5, 2012 Hello Everyone, I am doing a project where I am uploading user videos to amazon. On a page, user see titles of all the videos uploaded by him/her. These titles are clickable links(linked to amazon cloud). When clicked, it asks for "Open with" or "Save" in firefox. I want to play video in local player(which is available to user in his local machine) when link is clicked. I hope, it makes sense. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/269111-play-videos-in-local-video-player-when-clicked-on-the-link/ Share on other sites More sharing options...
seanlim Posted October 5, 2012 Share Posted October 5, 2012 I believe this would have to be done by setting the appropriate Content-Disposition header, either with server configurations or, if you are serving the files by PHP, by setting that header field. It will then be up to the browser to display the video using whatever video players are available on the local machine. Link to comment https://forums.phpfreaks.com/topic/269111-play-videos-in-local-video-player-when-clicked-on-the-link/#findComment-1382846 Share on other sites More sharing options...
piyusharora420 Posted October 29, 2012 Author Share Posted October 29, 2012 Could you please explain with an example? Sorry for the late reply Link to comment https://forums.phpfreaks.com/topic/269111-play-videos-in-local-video-player-when-clicked-on-the-link/#findComment-1388405 Share on other sites More sharing options...
codefossa Posted October 29, 2012 Share Posted October 29, 2012 If you're getting a direct download to the video file, you should use JS to create an element to embed the player. JW Player is a common and easy choice. If you meant to have it download to their PC and then playing it automatically, that's not something you can control. You could maybe try using a vlc:// link or something for common players, but not everyone uses it. Personally, I use SMPlayer .. so it would be a pain in the ass to someone like me. Many "common people" use Windows and their media player, which there's a plug-in for if you wanted to use that. I think you may need to explain more. But you shouldn't try to control software on the machine if you want it to be universal. If the first one was what you wanted, you should replace it each time so you don't end up embedding and buffering multiple videos, or you'll rape the bandwidth and most people can't handle that. Maybe give us more info? Link to comment https://forums.phpfreaks.com/topic/269111-play-videos-in-local-video-player-when-clicked-on-the-link/#findComment-1388514 Share on other sites More sharing options...
Jessica Posted October 29, 2012 Share Posted October 29, 2012 The "open with" is where the user can select what video player to open it with. You're already there. Link to comment https://forums.phpfreaks.com/topic/269111-play-videos-in-local-video-player-when-clicked-on-the-link/#findComment-1388516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.