/    Sign up×
Community /Pin to ProfileBookmark

Embedded Windows Media Player problems in Internet Explorer (fine in Firefox, Chrome)

Hi,

I am trying to play a video from javascript using the WMP plugin in IE. It works fine in Firefox and Chrome, but not IE. Any help would be great!

— embedded player in the HTML

<embed id=”player”
type=”application/x-mplayer2″
CLASSID=”CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6″
WIDTH=”1495″ HEIGHT=”840″ ShowControls=”1″ ShowStatusBar=”0″ ShowDisplay=”0″ autostart=”1″>

— Clicking on a button on the page calls the change_channel javascript method

function change_channel(channel_address) {

document.getElementById(“player”).URL=”file://C:/Users/Admin/Desktop/WebClient/videos/ball-jump-epic-fail.mp4″;
}

— This doesn’t play the video in IE8. It works if I use the SRC parameter when I embed the player, but I need the video to change when I click on buttons.

Thank you.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@donatelloMar 23.2010 — You've got to use the <object> tag.
Copy linkTweet thisAlerts:
@yankiefrankieauthorMar 24.2010 — Thank you donatello. I am trying to use the object tag now. My web page is not displaying the same way with object, so I have to re-factor it a bit.

Do you know what is the the problem with embed? Cause the change_channel method (above) is called correctly when I use embed, but the URL call doesn't do anything (IE). In Chrome and Firefox it displays the video.
Copy linkTweet thisAlerts:
@donatelloMar 25.2010 — You hit the nail right on the head.

IE

That's the problem!

LOL

We have all experienced the joy of making things work in IE... just when you got that right, you have to worry about IE6... fortunately, less people are using it... but now IE8 is making previously good sites go bad...

ahhhh Micro$oft!
×

Success!

Help @yankiefrankie spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...