Problems embedding media player in browser.

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

Problems embedding media player in browser.

Postby murphy79 » Mon 11 Jul, 2005 5:37 pm

I work for a firm that provides web-TV.
I get complaitns from mac users, and people using browsers that are not IE.

I use the <embed> tag, and set the mime type to: video/x-ms-wmv. I set the pluginspage to: http://www.microsoft.com/Windows/MediaPlayer/.

Can anybody help me get windows media files (wmv) to play in all browsers (or most possible)??
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Postby Ramona » Mon 11 Jul, 2005 6:08 pm

murphy79,

Feel free to copy the code from my page here: Test for Embedded WMV File.

This file plays in Opera 8.01, Netscape 7.2, Mozilla 1.7.8, SeaMonkey 1.0a, IE 5.5, and Firefox 1.0.4.

Editing to add Netscape 8.0.2...

Ramona
UserAgent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050611 Firefox/1.0.4
Last edited by Ramona on Tue 12 Jul, 2005 11:49 am, edited 1 time in total.
User avatar
Ramona
Moderator
Moderator
 
Posts: 2376
Joined: Wed 19 Jun, 2002 3:50 pm
Location: Midwest USA

Tried it

Postby murphy79 » Tue 12 Jul, 2005 3:48 am

I cant get any picture, just sound when playing in netscape 8.0
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Re: Tried it

Postby Fulvio » Tue 12 Jul, 2005 10:55 am

murphy79 wrote:I cant get any picture, just sound when playing in netscape 8.0


NS8 is an animal all its own. It is supposed to be able to switch from Firefox to the IE rendering engine. So everything should work. I am having a problem understanding what you want. Is any browser working?
You are listing complaints from Mac users (no browser listed), IE users (which version?) and Netscape 8, using some rendering engine.
since you say that you are having complaints, then you should be able to provide some link. Could you.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050706 Firefox/1.0.5
A minority may be right, and a majority is always wrong
~ Henrik Ibsen
WinXP, SP3, 512 MB, SM2.17.1, FF21, TB17.O.5, IE8.0, Google Chrome 27, Ghostwall , Avast 8.0.1, JRE1.7_21.
User avatar
Fulvio
Moderator
Moderator
 
Posts: 12004
Joined: Wed 19 Jun, 2002 10:08 am

Engine

Postby murphy79 » Tue 12 Jul, 2005 12:01 pm

I'm sitting on a windows computer, testing with netscape 8.0, and it makes no difference if I use IE rendering on your test page.
Safari browsers seems to have some trouble.
Is there anything I can do but change mime types and pluginpage?
How do I change URL in the <embed> tag, using javascript? It dont respond to Player.URL="..."; as it does in the <param> tag.

Try looking at: http://seilmagasinet.no/seiltv/

(sorry if my english is a bit off, I'm a bit rusty)
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
Last edited by murphy79 on Tue 12 Jul, 2005 12:04 pm, edited 1 time in total.
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Postby Ramona » Tue 12 Jul, 2005 12:02 pm

murphy79,

In order to enjoy Windows MediaPlayer embedded sound, especially in Firefox, you must install the MediaPlayer ActiveX plugin, which was created only for MediaPlayer.

There is a plugin for Firefox 1.x.x, and Mozilla 1.x, and can be downloaded at the Plug-in For Hosting ActiveX Controls site.

You might also wish to read more about using MediaPlayer with Firefox, and Step-By-Step Guide: Embedded Windows Media in Firefox 1.0.

I have no knowledge of using a Mac, so can't help you there. Please note that I did edit my earlier post to include Netscape 8.0.2, omission unintentional...

Ramona
UserAgent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050611 Firefox/1.0.4
User avatar
Ramona
Moderator
Moderator
 
Posts: 2376
Joined: Wed 19 Jun, 2002 3:50 pm
Location: Midwest USA

Postby Ramona » Tue 12 Jul, 2005 12:06 pm

murphy79,

I see we were posting at the same time. It isn't necessary to use the IE rendering engine to play the file.

I'm sorry but I am totally illiterate when it comes to Java... :cry:

Ramona
UserAgent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050611 Firefox/1.0.4
User avatar
Ramona
Moderator
Moderator
 
Posts: 2376
Joined: Wed 19 Jun, 2002 3:50 pm
Location: Midwest USA

Thanks

Postby murphy79 » Fri 15 Jul, 2005 9:45 am

Thanks for your help.
I have not been able to solv my problems with Netscape 8 (sound, no picture), and I'm not yet sure if it works in Safari (tries to start Quicktime).

Suggestions are welcome, but it seems like the problems are local on the clients machines, and out of my hands.
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Re: Engine

Postby Antony » Fri 15 Jul, 2005 10:22 am

murphy79 wrote:Try looking at: http://seilmagasinet.no/seiltv/
Where should I look at in that page?

murphy79 wrote:I'm sitting on a windows computer, testing with netscape 8.0, and it makes no difference if I use IE rendering on your test page.
Safari browsers seems to have some trouble.
Is there anything I can do but change mime types and pluginpage?
How do I change URL in the <embed> tag, using javascript? It dont respond to Player.URL="..."; as it does in the <param> tag.

Try this page: Windows Media Showcase

Your best bet it to include both [tt]<object><param>...[/tt] and [tt]<embed>[/tt]

The code I used was:
Code: Select all
<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=271
  CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
  STANDBY="Loading 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="autoStart" value="False">
  <PARAM name="filename" value="http://mac.sillydog.org/qt/mov/desktop_p5.wvx">
  <PARAM NAME="ShowControls" VALUE="True">
  <PARAM NAME="ShowStatusBar" VALUE="True">
<EMBED TYPE="application/x-mplayer2" SRC="http://mac.sillydog.org/qt/mov/desktop_p5.wvx"
NAME="MediaPlayer" WIDTH=320 HEIGHT=271
 autostart="false" showcontrols="true" showstatusbar="true"></EMBED>
</OBJECT>


Hope this helps.
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
User avatar
Antony
diamond member
diamond member
 
Posts: 14949
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

yes

Postby murphy79 » Fri 15 Jul, 2005 10:39 am

That is what I've been doing.
I've been trying to set diffrent types, and pluginpages, with no luck.

Do you know how to update the src attribute in the embed tag using javascript?
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Re: yes

Postby Antony » Fri 15 Jul, 2005 11:31 am

murphy79 wrote:Do you know how to update the src attribute in the embed tag using javascript?
I am not sure if it's doable, but a common method is to use [tt]document.write[/tt] from JavaScript.

I guess I don't quite understand what you want to achieve, do you have an example page?
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
User avatar
Antony
diamond member
diamond member
 
Posts: 14949
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

JavaScript

Postby murphy79 » Fri 15 Jul, 2005 12:36 pm

I use: Player.URL = "file.wmv"; to set the filename in the param tag, but it does not work for the embed tag.
(I use this to start a selected video from a button.)
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Re: Thanks

Postby Antony » Sun 17 Jul, 2005 7:16 am

murphy79 wrote:Thanks for your help.
I have not been able to solv my problems with Netscape 8 (sound, no picture), and I'm not yet sure if it works in Safari (tries to start Quicktime).
Hello murphy79 again.

Ramona's Windows Media Test page should work with Netscape 8, but if you just switched the rendering engine, it won't work that way.

When you say Safari tries to start QuickTime, I guess you have Flip4Mac's WMV Component installed. To get that to work, you will need to disable Flip4Mac's WMV plugin and use the Windows Media Player (plugin).

There's an Internet Plugins folder. Simply remove Flip4Mac plugin and replace with windows media player plugin. When you install Flip4Mac it creates a "Disabled" folder which should have the WMP plugin.
(taken from Flip4Mac community forum)

I will get back to you on JavaScript coding for swapping URLs.
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
User avatar
Antony
diamond member
diamond member
 
Posts: 14949
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Still trying

Postby murphy79 » Wed 20 Jul, 2005 4:24 am

Anyone know how to update the filename in the <embed> tag using javascript?
I have links to different videos in a page, and wish to update the url trough a javascript.
I have tried using the document.getElementById method with no luck.
I have a test player on this URL:

http://www.cikmedia.com/test/testing_player.html

Any new hints on my mac issue is very welcome.
I'm greatful for all help so far.
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215; .NET CLR 1.0.3705)
User avatar
murphy79
junior member
junior member
 
Posts: 16
Joined: Mon 11 Jul, 2005 5:12 pm
Location: Oslo, Norway

Re: Still trying

Postby Antony » Sat 23 Jul, 2005 11:06 am

murphy79 wrote:Anyone know how to update the filename in the <embed> tag using javascript?
I have links to different videos in a page, and wish to update the url trough a javascript.
I have tried using the document.getElementById method with no luck.
I have a test player on this URL:

http://www.cikmedia.com/test/testing_player.html

Any new hints on my mac issue is very welcome.
I'm greatful for all help so far.


I would suggest you rewrite the entire [tt]<div>[/tt] or [tt]<span>[/tt] tag enclosing [tt]<object>...<embed></object>[/tt].

e.g.
in HTML:
somewhere
[tt]<div id="movieBox" name="movieBox"><img src="path to image place holder">
</div>[/tt]

[tt]
movieString = '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="270" width="480"><param name="src" value="' + movieURL + '"><embed height="270" pluginspage="http://www.apple.com/quicktime/download/" src="' + movieURL + '" type="video/quicktime" width="480" controller="false" autoplay="true" loop="false" bgcolor="#000000"></object>''

if(typeof(document.getElementById) == 'function') {
document.getElementById(divID).innerHTML = movieString;
} else if( browser=="ie4" ) // for MSIE 4 only
{
document.all["movieBox"].innerHTML = movieString;
}[/tt]
UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.6 (KHTML, like Gecko) Safari/412.2
User avatar
Antony
diamond member
diamond member
 
Posts: 14949
Joined: Tue 18 Jun, 2002 11:36 pm
Location: Sydney, Australia

Next

Return to Web Design and Page Coding

Who is online

Registered users: Exabot [Bot], Google [Bot]