Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-23-2009, 12:15 PM   PM User | #1
fat
New Coder

 
Join Date: Jun 2009
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
fat is an unknown quantity at this point
displaying current position not working in firefox with WM plugin

Hi guys

I have a piece of code that works with IE7 and IE8 but don't work with firefox with the windows media plugin installed.

I'm trying to "alert" the current position (timeline) of a video.

html code:
Code:
<div class='videoDiv' id='showDis'>
<object classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' ID='MediaPlayer1'>
  <param name='url' value='myvideo.asx' />
  <param name='src' value='myvideo.asx' />
  <param name='showcontrols' value='true' />
  <param name='autostart' value='true' />
  <!--[if !IE]>-->
  <object type='video/x-ms-wmv' data='myvideo.asx' height='400' width='450'>
    <param name='src' value='myvideo.asx' />
    <param name='autostart' value='true' />
    <param name='controller' value='true' />
  </object>
  <!--<![endif]-->
</object>
</div>

<input type=button onclick="showCurrentPosition();" value="Show Timeline Position">
javascript code:
Code:
function showCurrentPosition(){
	objPlayer = document.getElementById('MediaPlayer1');
	alert(objPlayer.controls.currentPosition);
}
I get the following error:
Code:
Error: objPlayer.controls is undefined
here it says the "controls" object is suppose to work in firefox
what am I doing wrong in the javascript or html code ?
fat is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:36 AM.


Advertisement
Log in to turn off these ads.