View Full Version : getting wmp object playState from iframe

09-29-2010, 11:00 PM
I have a wmp object in an iframe and I would like to get the playState from a function in the main page. What I want to do is something like this:

function getPlayState(); {
parent.iframe1.getElementById. Player.playState
if playState==0
else {

Of course this doesn't work because I don't really know what I'm doing. But I think it shows what I want it to do. It only has to work in IE because it's for an app I'm making in an IE based app specific browser.

I don't even know if this is possible; but if it is, could someone help me turn it into a working function.

Thanks in advance.

10-01-2010, 02:39 AM
I figured it out. In case anyone has the same question, this is how I made it work:

function getPlayState(){
var MediaPlayer=parent.iframe1.document.getElementById("Player");
if (MediaPlayer.playState==0 || MediaPlayer.playState==1) {void(0)}
else {

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum