Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

Imbbed a Windows Media Player Object (Prefeerbly latest one 9 or 10) in html and connect to URL

Hello all , i need some help with this one.

i have this MedaiEncouder server , pushing video to clients ,
I can connect to it using my MediaPlayer (open URL) and i type http://192.168.1.4:8080 

i tried building a page that will load a Media Player object and load the file but i can't get it to connect.
this is the code i tried using

<object id="MediaPlayer" width=320 height=286
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Loading Microsoft® Windows® Media Player components..."
type="application/x-oleobject"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<PARAM NAME="filename" VALUE="interview_fox_video.asx">
<PARAM NAME="autoStart" VALUE="true"> <PARAM NAME="showControls" VALUE="true">
<param name="ShowStatusBar" value="true"> <PARAM NAME="Autorewind" VALUE="true">
<PARAM NAME="ShowDisplay" VALUE="false">
  <EMBED SRC="HTTP://192.168.1.4:8080" WIDTH=320 HEIGHT=286 type="application/x-mplayer2" name=MediaPlayer autostart=1 showcontrols=0 showstatusbar=1 autorewind=1 showdisplay=0>
</EMBED></OBJECT>


but this doesn't work ....
Any ideas ?
0
logicthought
Asked:
logicthought
  • 9
  • 3
  • 3
  • +1
1 Solution
 
str_kaniCommented:
Have a look at this url.
http://www.streamalot.com/embed.shtml
0
 
logicthoughtAuthor Commented:
Non of this links contain information that helps me , please look at the example , i am opening a URL !
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
German_RummCommented:
Hi logicthought,

If you connect to it by using 192.168.1.4:8080 as URL, why do you specify filename then?
try <param name="url" value="http://192.168.1.4:8080">

---
German Rumm.
0
 
logicthoughtAuthor Commented:
where exactly to i place that line ?
0
 
logicthoughtAuthor Commented:
This dosn't work , the page open i get the player but nothing happens:



<object id="MediaPlayer" width=320 height=286
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Loading Microsoft® Windows® Media Player components..."
type="application/x-oleobject"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="url" value="HTTP://192.168.3.1:8080">
<PARAM NAME="autoStart" VALUE="true"> <PARAM NAME="showControls" VALUE="true">
<param name="ShowStatusBar" value="true"> <PARAM NAME="Autorewind" VALUE="true">
<PARAM NAME="ShowDisplay" VALUE="false">
  <EMBED SRC="HTTP://192.168.3.1:8080" WIDTH=320 HEIGHT=286 type="application/x-mplayer2" name=MediaPlayer autostart=1 showcontrols=0 showstatusbar=1 autorewind=1 showdisplay=0>
</EMBED></OBJECT>




0
 
gecko_au2003Commented:
The url's that have been posted were good, here is a short example that I did for my website ( which can be found on my profile )

'===================== code snippet ==============================

<EMBED src="http://web.onetel.com/~shanerussell/ducky.mp3" width="145"
height="45" controls="smallconsole">
</embed>

'===================== End Code Snippet =========================

You would obvioulsy have to alter the src to fit your requirements to what site you want to connect to with regards to the audio source ie an mp3 , asx file or w/e making sure you insert the main URL before the audio file. Unless your audio file is in the same place as the html file or on the root of the webspace to where the html file is located.

Hopefully this helps you out a little bit, the other coded examples basically had extra parameters to add functionality items to the media player such as auto play, what buttons you wanted on the media player etc :)

The example I have given is for a small console :)
0
 
gecko_au2003Commented:
In your example you havent provided the location to the audio file whether it be an mp3 or an asx file so that needs to be included, as you can see in my example you can insert that snippet of code into any html file and even just stick the html file you create onto your desktop and it will still work provided that you are connected to the internet :)
0
 
logicthoughtAuthor Commented:
No this doesn't help at all , this is not a file but a Live Broadcast
(i connect via Media Player 9/10 File -> Open URL then i type my address and click ok
this opens up the live stream inside the application,
i want to get to the same point via web page using an imbedded control to open a a URL
again THIS IS A LIVE STREAM , pulled by clients , there is NO , i repeat NO FILE NAME of any sort
0
 
logicthoughtAuthor Commented:
o and its a video stream (not audio) not that it matters
0
 
German_RummCommented:
logicthought,

There are several things I don't understand from your code.
First, CLSID for Windows Media Player (as stated on MSDN) is 6BF52A52-394A-11d3-B153-00C04F79FAA6)
Second, do you test it on you local computer, or do you upload that HTML on server?
You see, 192.168.* is non-routable address, which you can access only from within you subnet.
Third, you said that you used "Open URL..." and typed 192.168.1.4, but in your code you use 192.168.3.1
What is your Encoder server address then?

Try this, and tell me if it works
<OBJECT ID="Player"
  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
  <PARAM name="autoStart" value="True">
    <param name="URL" value="http://192.168.1.4:8080"
</OBJECT>
0
 
logicthoughtAuthor Commented:
ok , yes its in my local network the URL works , the address is 192.168.1.4 (sorry about that)
I changed the CLSID to the one u provided , dosn't help much.
Any way in Open URL is use HTTP://192.168.1.4:8080 and i have no problems , want to do the same
again this is in my own subnet/local network so i can reach the address.
The Server is Window Media Encouder 9 running in PULL Mode (where clients connect directly and Pull video as aposed to the Push to Server option)
0
 
logicthoughtAuthor Commented:
Any idea's ? any one
0
 
German_RummCommented:
logicthought,

Well, I'm out of suggestions :-)
Try http://asia.cnet.com/builder/program/windows/0,39009376,39192993,00.htm maybe it will help..
0
 
gecko_au2003Commented:
On www.di.fm I think the website url is, they have live broad casts but the broad casts are stored in asx files so maybe you could do something simmiliar with regards to that and store the video broadcasts in there relevant format and then try it again ?

I understand more or less what you are trying to do now with regards to the live broadcasts and not having files. So other then what I just said, I am out of suggestions as well. The only things I can think of is to take a look on :

www.w3schools.com

www.htmlgoodies.com

Maybe they have some thing that would prove more useful LOL.

Best of luck with it :)
0
 
logicthoughtAuthor Commented:
for all of you that might be interested in this here is a small sample that works . (given that no firewall and SP2 are blocking cripting and stuff :)
Url is fake replace it with your own.
LT.


<HTML>
<HEAD>
</HEAD>
<BODY>
<OBJECT ID="Player" height="640" width="480"
  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
</OBJECT>
<INPUT TYPE="BUTTON" NAME="BtnPlay" VALUE="Play" OnClick="StartMeUp()">
<INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="ShutMeDown()">
<SCRIPT>
<!--

function StartMeUp ()
{
    Player.URL = "http://192.168.1.5:1430";
}

function ShutMeDown ()
{
    Player.controls.stop();
}

-->
</SCRIPT>
</BODY>
</HTML>
0
 
logicthoughtAuthor Commented:
no objection over here , i also do not mind changing the grade to B if possible .
lt.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 9
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now