rockindano30 Posted July 15, 2008 Share Posted July 15, 2008 hello all, i am working on a project and my client wants to put videos on his site and a list of videos that viewers can choose to view. any idea on how to go about it or start it? Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/ Share on other sites More sharing options...
dannyb785 Posted July 15, 2008 Share Posted July 15, 2008 you mean site like youtube? or the hundreds of others just like it? Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/#findComment-590955 Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 no not like youtube. more of just embedded windows media player but able to play different videos or have a list below links to different videos. Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/#findComment-590957 Share on other sites More sharing options...
rockindano30 Posted July 15, 2008 Author Share Posted July 15, 2008 more of giving the view a option to view one or two videos. Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/#findComment-590969 Share on other sites More sharing options...
I-AM-OBODO Posted July 19, 2008 Share Posted July 19, 2008 hi dear, how did you finally get to solve it, i'll like to know. thanks Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/#findComment-593932 Share on other sites More sharing options...
rockindano30 Posted July 31, 2008 Author Share Posted July 31, 2008 this is how i solved it using js. <html> <head> <title>Embed Media Player</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type"text/javascript"> function PlayMedia(clipName){ document.getElementById("player").innerHTML='<object id="mediaPlayer" width="265" height="190" ' +'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ' +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ' +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">' +'<param name="fileName" value="'+clipName+'">' +'<param name="autoStart" value="true">' +'<param name="showControls" value="true">' +'<param name="ShowStatusBar" value="1">' +'<param name="loop" value="false">' +'<embed type="application/x-mplayer2" ' +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" ' +'showcontrols="true" width="265" height="190" ' +'src="'+clipName+'" autostart="true" loop="false">' +'</embed>' +'</object>' } </script> <style type="text/css"> <!-- #playerframe { width: 268px; position: relative; padding: 5px; } #playerframe ul { background-color: #590002; padding: 0px; } #playerframe a { line-height: 35px; text-decoration: none; display: block; color: #CCCCCC; padding: 5px; } #playerframe a:hover { background-color: #800003; border: 1px solid #CCCCCC; } #playerframe li { list-style-type: none; display: block; } --> </style> <script src="Scripts/AC_ActiveX.js" type="text/javascript"></script> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body> <div id="playerframe"> <div id="player"> <script type="text/javascript"> AC_AX_RunContent( 'id','mediaPlayer','codebase','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701','type','application/x-oleobject','width','265','height','190','standby','Loading Microsoft Windows Media Player components...','classid','CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95','pluginspage','http://microsoft.com/windows/mediaplayer/en/download/','showcontrols','true','src','','autostart','true','loop','false','filename','','showstatusbar','1' ); //end AC code </script><noscript><object id="mediaPlayer" codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" width=265 height="190" standby="Loading Microsoft Windows Media Player components..." classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95> <PARAM NAME="fileName" VALUE="" /> <PARAM NAME="autoStart" VALUE="true" /> <PARAM NAME="showControls" VALUE="true" /> <PARAM NAME="ShowStatusBar" VALUE="1" /> <PARAM NAME="loop" VALUE="false" /> <embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" showcontrols="true" width="265" height="190" src="" autostart="true" loop="false"> </embed></object></noscript> </div> <ul> <li><a href="http://link.to.your.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video one </a></li> <li><a href="http://link.to.different.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video Two</a></li> <li><a href="http://link.to.different.clip.here.mpg" onClick="PlayMedia(this.href);return false">Video Three</a></li> </ul> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/114908-solved-media-player-for-videos-on-website/#findComment-604486 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.