| Author |
Message |
unix_man
Joined: 07 Jun 2005
Posts: 3
|
Posted:
Tue Jun 07, 2005 12:03 pm Post subject:
Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
Hi All,
Having some troubles with a WMP not working in gecko browsers, I was very pleased to find this forum.
I've made some searches, read some thread, but still I can't figure out what is the right method to get a working code for all browsers.
Can you please help me ?
The code I currently use is:
<OBJECT TYPE="application/x-oleobject" ID="LIVENARRATION" WIDTH="300" HEIGHT="200"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701">
<PARAM NAME="fileName" VALUE="mms://62.235.20.22/nostalgie/">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="InvokeURLs" VALUE="false">
<PARAM NAME="ShowTracker" VALUE="false">
<PARAM NAME="ShowStatusBar" VALUE="true">
<EMBED TYPE="application/x-mplayer2" AUTOSTART="1" InvokeURLs="0" ShowTracker="0" ShowStatusBar="1"
PLUGINSPAGE="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
ID="LIVE" NAME="LIVE" WIDTH="300" HEIGHT="200"
SRC="mms://62.235.20.22/nostalgie/">
</EMBED>
<APPLET MYSCRIPT code=NPDS.npDSEvtObsProxy.Class
width=5 height=5 name=appObs>
</APPLET>
</OBJECT>
The player is correctly displayed and play the stream. But I need to be able to stop / start the stream by some code and the call to some methods is working only in IE.
I use:
<a href="#" onClick="playLN();">start (not working)</a> <BR>
<a href="#" onClick="stopLN();">stop</a> <BR><p>
to call the two methods play() and stop()
(it works fine in IE)
Have you got somewhere on the internet some examples with calls to the play() stop() methods ?
Thanks,
|
|
| Back to top |
|
 |
Sebastian Gottschalk
Guest
|
Posted:
Tue Jun 07, 2005 10:39 pm Post subject:
Re: Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
unix_man wrote:
| Quote: | Hi All,
Having some troubles with a WMP not working in gecko browsers, I was
very pleased to find this forum.
|
This is no forum, this is usenet, and a web interface doesn't make it a
forum. Please take the time to understand the differences.
In usenet there is a rule to use a replyable email adress, which is allowed
to act like a black hole - but don't use invalid adresses.
| Quote: | I've made some searches, read some thread, but still I can't figure
out what is the right method to get a working code for all browsers.
|
Neil Smith already posted very good suggestions for multibrowser
multiplatform code. Why didn't you search before you ask?
| Quote: | OBJECT TYPE="application/x-oleobject" ID="LIVENARRATION"
WIDTH="300" HEIGHT="200"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
[...]
EMBED TYPE="application/x-mplayer2" AUTOSTART="1" InvokeURLs="0"
|
Auwee. Even though the Classid is invalid for any sane browsers, Gecko
based browsers sometimes recognize it as a valid HTML 4.01 Object Tag - and
therefore, ignore the inner part.
Oh, and the Embed-Type is wrong - it should be referring to the media type
insetad of the player, so video/x-ms-wmv might be a better choice. And I
can't see any reasone why you're trying to use mplayer2 instead of
wmplayer.
| Quote: | APPLET MYSCRIPT code=NPDS.npDSEvtObsProxy.Class
|
It is "MAYSCRIPT" aka "i may be able to script". And the atribute values
should be correctly surrounded by quoting marks.
Anyway, APLLET tag is deprecated and should be replaced by full-featured
Object Tag, e.g. <OBJECT SRC="NPDS.npDSEvtObsProxy.Class"
DATA="NPDS.npDSEvtObsProxy.Class" CLASSID="java:NPDS.npDSEvtObsProxy.Class"
| Quote: | I use:
a href="#" onClick="playLN();">start (not working)</a
BR
a href="#" onClick="stopLN();">stop</a
BR><p
to call the two methods play() and stop()
(it works fine in IE)
Have you got somewhere on the internet some examples with calls to the
play() stop() methods ?
|
Burk. Are you using correct getElemByID() or getElembyTagName()? And why
are you unable to create correct links by using javascript:code()
reference? "#" will enforce a page reload!
--
Dieser Schrieb stellt eine private Meinungsäußerung des Verfassers im
Sinne der gesetzlich garantierten Meinungsfreiheit dar. Wem das nicht
passt, der wende sich an das Bundesverfassungsgericht. Viel Erfolg!
Key: 0xA0E28D18 FP: 83AE 1136 1E2B 9767 8FB2 7594 4128 1A9E A0E2 8D18 |
|
| Back to top |
|
 |
zachd [ms]
Guest
|
Posted:
Wed Jun 08, 2005 12:30 am Post subject:
Re: Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
"Sebastian Gottschalk" <seppi@seppig.de> wrote in message
news:18gkrci56xyx7$.dlg@news.cis.dfn.de...
| Quote: | unix_man wrote:
EMBED TYPE="application/x-mplayer2" AUTOSTART="1" InvokeURLs="0"
Oh, and the Embed-Type is wrong - it should be referring to the media type
insetad of the player, so video/x-ms-wmv might be a better choice. And I
can't see any reasone why you're trying to use mplayer2 instead of
wmplayer.
|
Actually, no, "application/x-mplayer2" is correct. Anything else is very
wrong. You're thinking of the association as TYPE-->renderer, whereas if
you're using scripting, that's very bad. In the scripting case, you want
TYPE-->scripting interface, right? Because otherwise you're scripting
against a random type handler, which causes problems. I hope that's a clear
explanation. If not, trust me on this one - I deliberately created the
usage of "application/x-mplayer2" to work around this hole in the EMBED
logic. =)
| Quote: | I use:
a href="#" onClick="playLN();">start (not working)</a
BR
a href="#" onClick="stopLN();">stop</a
BR><p
to call the two methods play() and stop()
(it works fine in IE)
Have you got somewhere on the internet some examples with calls to the
play() stop() methods ?
Burk. Are you using correct getElemByID() or getElembyTagName()? And why
are you unable to create correct links by using javascript:code()
reference? "#" will enforce a page reload!
|
Do you mean as in:
<a href="javascript:blah()">blah!</a>
? That has never worked and isn't supported. An HREF is treated as a
navigation event by Internet Explorer, which means that ALL plug-ins on the
page are sent OLE_CMDID_STOP, which means... you've just stopped the player
previous to any execution of your script. Functionally, <a
href="javascript:blah()"> is the same as pressing "STOP" in IE... it's going
to wreak havoc with your scripting.
Random tidbits of knowledge... =)
-Zach
--
(speaking for myself and doing this in my free time)
See http://www.zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
|
|
| Back to top |
|
 |
unix_man
Joined: 07 Jun 2005
Posts: 3
|
Posted:
Wed Jun 08, 2005 8:14 pm Post subject:
Re: Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
| Sebastian Gottschalk wrote: |
I've made some searches, read some thread, but still I can't figure
out what is the right method to get a working code for all browsers.
|
Neil Smith already posted very good suggestions for multibrowser
multiplatform code. Why didn't you search before you ask?
| Quote: |
I've just told you above I've made some searches. I've seen some Neil's answers but infortunately it was not enough for me as I was looking for some examples of WMP Stop() / Start() methods calls.
|
Thanks for your answer.  |
|
| Back to top |
|
 |
unix_man
Joined: 07 Jun 2005
Posts: 3
|
Posted:
Wed Jun 08, 2005 8:24 pm Post subject:
Re: Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
Thanks for your message Zachd.
I still need to know if under Firefox I am able to call some WMP methods to stop / start the player.
The example with href is not correct, but it was just my test page which is working fine in IE.
I am going to look at the WMP faq you gave me.
Thanks |
|
| Back to top |
|
 |
Bill Burns
Guest
|
Posted:
Thu Jun 09, 2005 9:52 pm Post subject:
Re: Embedded WMP for IE, Firefox, Mozilla, Opera |
|
|
You shouldn't use href - try using a button and set the onclick event.
<input type="button" value="Play" onclick="Play();">
Your code would then be (assuming your media player is named "MediaPlayer"):
function Play(){
document.MediaPlayer.Play();
}
Thanks,
Bill
"unix_man" <jguellec@free-dot-fr.no-spam.invalid> wrote in message
news:BK2dnbQ-L6U7EDrfRVn_vg@giganews.com...
| Quote: | Thanks for your message Zachd.
I still need to know if under Firefox I am able to call some WMP
methods to stop / start the player.
The example with href is not correct, but it was just my test page
which is working fine in IE.
I am going to look at the WMP faq you gave me.
Thanks
|
|
|
| Back to top |
|
 |
mritzman
Joined: 15 Dec 2005
Posts: 1
|
Posted:
Thu Dec 15, 2005 10:25 pm Post subject:
|
|
|
Did you find a solution to scripting with an embedded media player object in Mozilla Firefox without installing the ActiveX control. I have searched and searched and have not found a solution.
I tried the example provided by Microsoft (http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/imedia/netshow/events2/default.asp)
to no avail. I tried their code in Mozilla Firefox 1.5 and got the 'Applet appsObs notinited' error meaning it can't find the class 'NPDS.npDSEvtObsProxy.class', can we download this class anywhere?
Thanks for any help in advance. |
|
| Back to top |
|
 |
|
|
|
|