Wednesday, May 2, 2012

Re: [YouTube-API] Re: IFrame JavaScript API error: Cannot call method 'postMessage' of null

Hello,

I also get this sometimes, but on a different line:

s.ytimg.com/yt/jsbin/www-widgetapi-vflm8JaFy.js:15Uncaught TypeError: Cannot call method 'postMessage' of null


and I'm not reloading the player to get this.
I cannot reproduce reliably either, just refreshing the app will usually work. 

Any hints on how to fix this one?

Thanks


On Sunday, March 27, 2011 1:39:27 PM UTC+3, Tim Wintle (Guru) wrote:
On Thu, 2011-03-24 at 22:04 -0700, Tyang wrote:
> Hi Tom, I'm seeing the same errors as John. Yes, I am closing removing
> an iframe and then opening another immediately in a separate DOM.

The Player object exposes a method to remove the element (which I think
is currently undocumented).

try calling

player.destroy();

- it works for me, although I haven't looked closely enough to work out
why this works and simply removing the iframe element doesn't.

Tim Wintle

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/youtube-api-gdata/-/thzY-mMsoisJ.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment