Loading...

youtube-api-gdata@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[YouTube-API] Uncaught TypeError: Cannot call method 'apply' of undefined Yihya Hugirat Fri Feb 24 08:01:30 2012

[17.03.1970 21:28:20] JavaScript - http://localhost.www/
Event thread: message
Uncaught exception: TypeError: Cannot convert 'this.d[k+1]' to object
Error thrown at line 8, column 134 in <anonymous function: 
O.prototype.t>(a, c) in 
http://s.ytimg.com/yt/jsbin/www-widgetapi-vflRsNgrG.js:
    this.d[k+1].apply(this.d[k+2],d)
called from line 14, column 28 in <anonymous function>(a, c, b) in 
http://s.ytimg.com/yt/jsbin/www-widgetapi-vflRsNgrG.js:
    a.pubsub.t(c,{target:a,data:b})
called from line 16, column 100 in <anonymous function: X.prototype.m>(a) 
in http://s.ytimg.com/yt/jsbin/www-widgetapi-vflRsNgrG.js:
    V(this,"onReady");
called from line 10, column 2616 in <anonymous function: R.prototype.o>(a) 
in http://s.ytimg.com/yt/jsbin/www-widgetapi-vflRsNgrG.js:
    a.origin==T(this,"host")&&(a=JSON.parse(a.data),S[a.id].m(a))
called as bound function from line 10, column 1188 in <anonymous 
function>(b) in http://s.ytimg.com/yt/jsbin/www-widgetapi-vflRsNgrG.js:
    return c.call(a,b)

i get the error above  when i use the following code

var player = new YT.Player('tx_rlemediabanner_ytplayer_container_'
+ playerId, {
height : height,
width : width,
videoId : videoId,
playerVars : {
'autoplay' : autoplay,
'autohide' : 1,
'controls' : 1,
'showinfo' : 0,
'rel' : 0
},
events : {
'onReady' : onYouTubeIFramePlayerReady(playerId),
'onStateChange' : onytplayerStateChange()
}
});

but when i use this code i get no errors

swfobject.embedSWF("http://www.youtube.com/e/" + videoId
+ "?version=3&autohide=1&autoplay=" + autoplay
+ "&showinfo=0&controls=1&rel=0&enablejsapi=1&playerapiid="
+ playerId, "tx_rlemediabanner_ytplayer_container_" + playerId,
width, height, "8", null, null, params, atts,
onYouTubePlayerAPIReady);

the problem is that i need both 
can anyone please tell me what does i make worng?



-- 
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/-/fSTvweRJCzoJ.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/youtube-api-gdata?hl=en.