Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Javascript error loading multiple Youtube players on a single page.


http://aboutface.commonmediainc.com/test.html

Wait 5 seconds for the second video to load. If they load at the same time, it works.

All subsequent video .setup() calls fail with an "'undefined' is not an object (evaluating 'b.replace')" error in Safari, with similar errors in Chrome and Firefox on OSX. It also fails if you .remove() and then .setup() a new video file in the first DIV.

7 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

I reported this as a bug with the html5 player+youtube in our ticketing system, thanks. I would use primary as flash for now.

steve.friedman

User  
0 rated :

Unfortunately, iOS compatibility is crucial here.

Do you have any thoughts on how long it will be before this is reviewed? Can we be informed when it is resolved?

Ethan Feldman

JW Player Support Agent  
0 rated :

If the timer isn’t used, it works though? Also Flash as primary won’t prevent the player rendering on iOS.

Or you can revert to 6.8, and it will still fall back to the default YouTube player on iOS – http://p.jwpcdn.com/6/8/jwplayer.js

steve.friedman

User  
0 rated :

I assume Flash as primary will still switch to HTML5 on iOS and the same multiple-player errors will appear.

I will try 6.8.

Ethan Feldman

JW Player Support Agent  
0 rated :

I would try that first, before reverting.

steve.friedman

User  
0 rated :

Flash as primary resulted in the same iOS errors. But reverting to v6.8 resulted in multiple working Youtube players.

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, thanks. I will report this.

This question has received the maximum number of answers.