amazon-archives / web-app-starter-kit-for-fire-tv

Web App Starter Kit Examples
https://amzn.github.io/web-app-starter-kit-for-fire-tv/
Other
372 stars 161 forks source link

Youtube multiPlaylists do not work, please add an example with a working multiPlaylist #26

Closed fragalles closed 6 years ago

fragalles commented 8 years ago

The code reference seams to be wrong as channels: opens the bracket [ and then the multiplaylist ids: close the bracket ]...

So which brackets should we use to get it working?

For example with following playlists in init.js:

    channels: [
        {
            type: "multiPlaylists",
            ids: ["PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U",
                  "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U",
                  "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U"],
            title: "Many Playlists"
        }
    ],

nothing gets rendered on google chrome:

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefinedLeftNavView.shiftNavScrollContainer @ leftnav-view.js:349 LeftNavView.render @ leftnav-view.js:205App.initializeLeftNavView @ app.js:332(anonymous function) @ app.js:110(anonymous function) @ model-youtube-api.js:255(anonymous function) @ model-youtube-api.js:66j @ jquery.js:2k.fireWith @ jquery.js:2x @ jquery.js:4(anonymous function) @ jquery.js:4

craigcbrunner-amazon commented 8 years ago

Yes, this is a bug with our docs, will fix in our upcoming doc revision, the doc should read:

        ids: ["PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U",
              "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U",
              "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U"],
fragalles commented 8 years ago

Great, thank you that is working for me! One other thing: Is there a way to get the youtube player working on a mobile phone (for example an iphone)? At the moment I can only see the spinning circle but no video plays back, when I launch this example on IOS 8 chrome and safari:https://amzn.github.io/web-app-starter-kit-for-fire-tv/youtube-sections/

Maybe these warnings that show up in a desktop browser are related to that: [Warning] Invalid CSS property declaration at: * (www-embed-player-sprite-mode-vflB5j61c.css, line 1)[Warning] Invalid CSS property declaration at: * (www-embed-player-sprite-mode-vflB5j61c.css, line 1)[Warning] WebGL: INVALID_ENUM: getParameter: invalid parameter name, WEBGL_debug_renderer_info not enabled (base.js, line 3900, x2) Lwww-widgetapi.js:27:345Unable to post message to https://www.youtube.com. Recipient has origin https://amzn.github.io.postMessageLwww-widgetapi.js:26:344Pwww-widgetapi.js:25

RegardsPeter

craigcbrunner-amazon <notifications@github.com> schrieb am 20:35 Montag, 30.November 2015:

Yes, this is a bug with our docs, will fix in our upcoming doc revision, the doc should read: ids: ["PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U", "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U", "PLhr1KZpdzukf6YADEpM6nFEZs7VDhEs5U"], — Reply to this email directly or view it on GitHub.

CrandellWS commented 8 years ago

@craigcbrunner-amazon I say fix the code and leave the docs.

The pull request shows the required code change by adding the 7 lines at:

https://github.com/amzn/web-app-starter-kit-for-fire-tv/pull/31/files#diff-fb74713b788800ac329b6b4ba364c5eeR254