You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

player_api is undefined error in IE 6 and 7 Created Apr 17, 2009

This thread is solved

Views: 3521     Replies: 11     Last reply Sep 21, 2009  
You must login first before you can use this feature

Mark Mitchell
Ricca Group Medical Market Research http://www.riccagroup.com http://www.medsurvey.com

Posts: 2

Registered:
Apr 17, 2009

player_api is undefined error in IE 6 and 7

Posted: Apr 17, 2009

Using flower player in IE 6 and 7 produces a strange error in IE when inside our survey pages. The problem seems to relate to the tag being inside the main <form> tag of the page. I found this was already posted by someone but only found in a google cache page

IE6 Javascript error: 'player_api' is not defined.

http://74.125.47.132/search?q=cache:DLo8mZdjlegJ:193.33.186.56/forum/8/16495+flowplayer+player_api&cd=9&hl=en&ct=clnk&gl=us&client=firefox-a

This seems to hold true. If you move the tag outside of the form it works fine in IE. Before moving it we would get the error but the clip would play however none of the callback functions would be executed because the API was not functioning.

We were able to work around this issue using absolute positioning but this is not always an option and this IE issue should be investigated.

__aaron__

Posts: 4

Registered:
Apr 17, 2009

» player_api is undefined error in IE 6 and 7

Posted: Apr 20, 2009

Reply to: player_api is undefined error in IE 6 and 7, from carcus88
Here's a link to the other discussion... I incorrectly through that it was the <head> tag that was causing the problem but see that it was actually the <form> tag which causes it.

This error is also occuring in IE8.

Regards,
Aaron

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 259

Registered:
Dec 17, 2008

» player_api is undefined error in IE 6 and 7

Posted: Apr 20, 2009

Reply to: player_api is undefined error in IE 6 and 7, from carcus88
Is this presently occuring in 3.1?

I have not been able to recreate this in ie6/ie7/ie8 (xp & windows 7)

Cheers

Buzz

__aaron__

Posts: 4

Registered:
Apr 17, 2009

» » player_api is undefined error in IE 6 and 7

Posted: Apr 20, 2009

Reply to: » player_api is undefined error in IE 6 and 7, from DBusby
Yes this has been verified with both 3.05 and 3.1 with IE 6, 7, and 8 on XP and Vista.

The original thread thread has a more detailed error report and more information. As far as I know this error occurs only in conjunction with playlists, and does not happen when the player is used by itself.

Adding a <form> tag around the page body in the playlist samples (this one for example), will cause this error to occur.

Hope this helps,
Aaron

Buzz
Author of 'Wordpress Flowplayer', jQuery.saiweb http://saiweb.co.uk Problems, requests? Please log a ticket at: http://trac.saiweb.co.uk

Posts: 259

Registered:
Dec 17, 2008

» » » player_api is undefined error in IE 6 and 7

Posted: Apr 20, 2009

Reply to: » » player_api is undefined error in IE 6 and 7, from __aaron__
Hi __aaron__,

For something to be 'verified' as a problem it has to have been confirmed by the flowplayer authors / support team.

I am not disputing whether or not the bug exists at this time, I have simply said I have been unable to replicate it

I have now replicated the page here:http://www.saiweb.co.uk/playlist-internal.htm

I have added in the html, head, and body tags.

I will be updating shortly with my finding on ie6,ie7, and ie8.

UPDATE:

IE8 Beta Windows 7 Beta:http://screencast.com/t/RRa0D3UHVUN

'wrapper' undefined error.

IE7 XP SP3:http://screencast.com/t/118CIVdH

Renders incorrectly but does play.

IE6 XP SP3:http://screencast.com/t/3kBk7uq6H6

Renders incorrectly but does play.

Opera 9.63 XP SP3:http://screencast.com/t/N0AFpcxucy

Renders incorrectly and does not play.

I've forwarded this onto the dev team.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» » » » player_api is undefined error in IE 6 and 7

Posted: Apr 21, 2009

Reply to: » » » player_api is undefined error in IE 6 and 7, from DBusby
I tried this test page you had with IE8 and there were only CSS problems. Playlist worked fine.

This thread seems to verify that Flowplayer & playlist combination does not work inside FORM tag on IE. I see that it's something we cannot do anything about and a simple warning message on the documentation should be enough. Is this the case here?

Mark Mitchell
Ricca Group Medical Market Research http://www.riccagroup.com http://www.medsurvey.com

Posts: 2

Registered:
Apr 17, 2009

» » » » » player_api is undefined error in IE 6 and 7

Posted: Apr 21, 2009

Reply to: » » » » player_api is undefined error in IE 6 and 7, from tipiirai
I think a warning would be great plus now that this in the forums people can find the issue when searching for "player_api is undefined".

Moving outside of a form and still having it positioned where you want can be achieved a number of ways including absolutely positioning a div element which contains the player.

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» » » » » » player_api is undefined error in IE 6 and 7

Posted: Apr 21, 2009

Reply to: » » » » » player_api is undefined error in IE 6 and 7, from carcus88
great. I'll post here when the documentation is updated.

Manuel Razzari
http://ultimorender.com.ar/funkascript

Posts: 6

Registered:
Apr 24, 2009

Documented Flash bug, and a fix

Posted: Apr 24, 2009

Reply to: player_api is undefined error in IE 6 and 7, from carcus88
Hello all,

This is a documented Flash issue.

This bug is often visible on .NET pages, which wrap the entire HTML inside a FORM tag.

Quick fix: search inside flowplayer-3.1.0.min.js for

}window.flashembed
Notice the curly bracket at the beggining?

Before that bracket, add the following:

if(document.all){window[o.id]=document.getElementById(o.id);}

If you're working with the non-minified flowplayer-3.1.0.js the fix is to add the following right at the end of the "Flash" function:

if(document.all){window[opts.id] = document.getElementById(opts.id);}

I'd like to be able to offer a nicer solution that doesn't require tampering the core file, but I guess this should be included as a bugfix anyway...

Hope this helps!

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1672

Registered:
Nov 16, 2007

» Documented Flash bug, and a fix

Posted: Apr 24, 2009

Reply to: Documented Flash bug, and a fix, from ManuelRazzari
Hello,

This line is now added to the source code. We do a little testing and the change will be out on the next release of flashembed / flowplayer.js.

Thank you for this!

Manuel Razzari
http://ultimorender.com.ar/funkascript

Posts: 6

Registered:
Apr 24, 2009

» » Documented Flash bug, and a fix

Posted: Apr 24, 2009

Reply to: » Documented Flash bug, and a fix, from tipiirai
That sounds great, glad I could help :)
And thanks to you for this awesome player.

njbr

Posts: 1

Registered:
Sep 21, 2009

» Documented Flash bug, and a fix

Posted: Sep 21, 2009

Reply to: Documented Flash bug, and a fix, from ManuelRazzari
We discovered a big issue with this addition. If you don't specify the "id", it creates a weird memory condition in IE, creating a "length" property onto JavaScript objects. This then fails the "each" method's (length === undefined) check above in the file. This causes the each() function to fail the extend() of the many methods needed to instantiate the player.

here's a raw example:

({a:1}.length === undefined) == true
myObj = {}; window[myObj.id] = document.getElementById("invalidID");
({a:1}.length === undefined) == false

Apparently setting an 'undefined' property on [window] is the cause. The above is in IE7 and 8. I haven't checked IE 6.

A solution would be to add a (&& opts.id) check to the condition.