Thursday, April 19, 2012

[YouTube-API] Re: YouTube iFrame API: Firefox compatibility

Hi Jeff,

yes, that makes sense. Thanks for clarifying this and for your support! I'll simply target the https by default, like you suggest.

Best wishes
Sylvester


On Tuesday, April 17, 2012 11:05:34 PM UTC+2, Jeffrey Posnick wrote:
Hello Sylvester,

 Okay, that makes sense. There's cross-communication that needs to
take place between various pieces of code when using the <iframe> API,
and the domains that are talking together need to match properly. If
you take a look at the error console in Firefox when you have that
HTTPS Everywhere extension installed, you'll see messages like

Security Error: Content at http://www.youtube.com/ may not load data
from
https://www.youtube.com/embed/Ve7qZUfUKs4?autohide=2&autoplay=0&controls=1&enablejsapi=1&loop=0&modestbranding=1&origin=http://ctbto.semicolon.at.

 This is not something we can work around on our end.

 You might be able to work around it in your code by specifically
using the "https://" prefix when loading the YT.Player JavaScript
library (https://github.com/inukshuk/jquery.tube.js/blob/master/src/
player.js#L154
) instead of using the page-relative "//" prefix.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Apr 11, 5:00 am, Sylvester Keil <sylvester.k...@gmail.com> wrote:
> Jeff,
>
> I was able to trace the issue to a Firefox Extension:
>
> https://www.eff.org/https-everywhere
>
> I suspect that perhaps a different version of the script is loaded via SSL
> or that a part that handles API injection is not available via SSL. Could
> this be the problem? If so, is this something the you could address or
> should I report the issue with HTTPS Everywhere?
>
> Best wishes,
>
> Sylvester
>
>
>
>
>
>
>
> On Wednesday, April 11, 2012 10:29:33 AM UTC+2, Sylvester Keil wrote:
>
> > Hi Jeff,
>
> > thanks for your support! Using the the demo page, I can observe the
> > following behaviour in Firefox 11:
>
> > 1. There are two player instances loaded initially. The plugin actually
> > checks whether or not the iFrame API is supported and either uses that or
> > the Javascript API. For FF11 it loads the iFrame and, in my case, it uses a
> > Flash object for the players. I can playback both videos, so loading a
> > single video works fine.
>
> > 2. However, when I now click on a video in one of the playlists, the
> > expected behaviour is for that video to be loaded into one of the existing
> > player instances (i.e., my approach was to make it possible to reuse a
> > player if it already exists). This fails for me in FF11 because the player
> > object does not have loadVideoById.
>
> > My assumption initially was that I was doing something wrong when storing
> > the player reference (I'm using jQuery's data method to do that), but this
> > works flawlessly in other browsers.
>
> > To make debugging easier I also added the Getting Started example as a
> > page here:
>
> >https://github.com/inukshuk/jquery.tube.js/blob/master/demo/test.html
>
> > If I run this in FF the video plays without any problems, but, again, the
> > player object has methods like getVideoEmbedCode but is missing all/most of
> > the API methods. Because of this, the video does not stop after six seconds
> > as it is supposed to. I see this issue only in FF: Opera, Safari, Chrome
> > and IE work fine.
>
> > Thanks,
>
> > Sylvester
>
> > On Tuesday, April 10, 2012 3:21:40 PM UTC+2, Jeffrey Posnick wrote:
>
> >> Hello Sylvester,
>
> >>  I just ran a local copy of your plugin's demo page (https://
> >> github.com/inukshuk/jquery.tube.js/tree/master/demo) and the API
> >> functionality worked in Firefox 11 on OS X there—clicking on entries
> >> in the list caused the videos in one of the two players to change. Can
> >> you confirm that?
>
> >>  So far this is not pointing to an issue with the API's compatibility.
> >> Perhaps there's just something specific with your code on the more
> >> complicated page that's causing Firefox to be unhappy?
>
> >> Cheers,
> >> -Jeff Posnick, YouTube API Team
> >> groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
> >> @YouTubeDev
>
> >> On Apr 5, 7:41 pm, Sylvester Keil <sylvester.k...@gmail.com> wrote:
> >> > I can confirm this, too. It works on Safari, but not in Firefox.
> >> (Pretty
> >> > cool project by the way!)
>
> >> > On Thursday, March 29, 2012 9:40:47 PM UTC+2, Raibaz wrote:
>
> >> > > I'm experiencing the same problem as well.
>
> >> > > I've been developing a website using the iframe api (
> >> > >http://raibaz.github.com/wrltzr/), and while building the site with
> >> > > Chrome didn't experience any problems; however, when testing with
> >> Firefox,
> >> > > i noticed the exact same behavior described in the original post.
>
> >> > > In Safari, it works correctly.

--
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/-/2DfXJk-GZpAJ.
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