Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-230245] New Dullahan versions have issues with the Youtube Embedded Player API #7966

Closed
sl-service-account opened this issue Feb 18, 2021 · 1 comment

Comments

@sl-service-account
Copy link

sl-service-account commented Feb 18, 2021

What just happened?

The Youtube Player takes anywhere from 7 to 40 seconds to load under most conditions. First there is a white screen for a period (even though the webpage is fully loaded). Second there is a black screen for a period. Then the video loads and plays, but then under some conditions the controls take an additional 20-30 seconds to become responsive.

What were you doing when it happened?

Try to play any Youtube Video through their embedding API.

What were you expecting to happen instead?

The video to play instantly the moment the API tells me that it's ready to play videos.

Other information

  • Bug does not occur using the browser at the Second Life Official viewer start screen. Only while in-world.

  • Bug also always occur when using a media screen on a prim.

  • Bug is less evident on Dullahan 1.7.0 opposed to 1.8.0 (meaning it's slower on 1.8.0). Official viewer uses 1.7.0. Firestorm uses 1.8.0.

  • Bug did not occur on Dullahan 1.3.4.

  • Bug does not occur on subsequent embeds. But when the browser is closed or the media prim is turned off and back on, the issue appears again.

    The attached videos will show the issues. Excuse me for the horrible crop.

    Test page available for debugging: https://mediasl5.momo.re/youtube_test.html
    Test object script:

    default
    {
        state_entry()
        {
            llSetPrimMediaParams(0, [
                PRIM_MEDIA_AUTO_PLAY,TRUE,
                PRIM_MEDIA_CURRENT_URL,"https://mediasl5.momo.re/youtube_test.html",
                PRIM_MEDIA_HOME_URL,"https://mediasl5.momo.re/youtube_test.html",
                PRIM_MEDIA_HEIGHT_PIXELS,1024,
                PRIM_MEDIA_WIDTH_PIXELS,1024
            ]);
        }
    }

    Additional technical details:

    1. Load Youtube API asynchonously
    2. Wait for Youtube's iframe to call "onYouTubeIframeAPIReady".
    3. Create "var player = new YT.Player( ... );"
    4. At this point, any property or method such as "getPlayerState" should be defined. But it's not. It can take anywhere from 7 to 40 seconds depending on Dullahan version for it to become defined & the player to start playing the video. It can take even longer for the player's UI controls to finally load. By that I mean the controls become highlighted but pressing any button does nothing until it is loaded.

     

    It might not be specific to Youtube API, but rather loading Javascript files asynchronously.

Attachments

  • 1.mp4 2021-02-18 08:20:12
  • 2.mp4 2021-02-18 08:20:12
Original Jira Fields
Field Value
Issue BUG-230245
Summary New Dullahan versions have issues with the Youtube Embedded Player API
Type Bug
Priority Unset
Status Closed
Resolution Triaged
Reporter omoMMomo (omommomo)
Created at 2021-02-18T13:22:11Z
Updated at 2021-08-09T20:58:27Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2021-02-19T15:43:14.117-0600',
  "Is there anything you'd like to add?": '* Bug does not occur using the browser at the Second Life Official viewer start screen. Only while in-world.\r\n* Bug also always occur when using a media screen on a prim.\r\n* Bug is less evident on Dullahan 1.7.0 opposed to 1.8.0 (meaning it\'s slower on 1.8.0). Official viewer uses 1.7.0. Firestorm uses 1.8.0.\r\n* Bug did not occur on Dullahan 1.3.4.\r\n\r\nThe attached videos will show the issues. Excuse me for the horrible crop.\r\n\r\nTest page available for debugging: https://mediasl5.momo.re/youtube_test.html\r\nTest object script:\r\n\r\ndefault\r\n{\r\n    state_entry()\r\n    {\r\n        llSetPrimMediaParams(0, [\r\n            PRIM_MEDIA_AUTO_PLAY,TRUE,\r\n            PRIM_MEDIA_CURRENT_URL,"https://mediasl5.momo.re/youtube_test.html",\r\n            PRIM_MEDIA_HOME_URL,"https://mediasl5.momo.re/youtube_test.html",\r\n            PRIM_MEDIA_HEIGHT_PIXELS,1024,\r\n            PRIM_MEDIA_WIDTH_PIXELS,1024\r\n        ]);\r\n    }\r\n}\r\n\r\nAdditional technical details:\r\n1) Load Youtube API asynchonously\r\n2) Wait for Youtube\'s iframe to call "onYouTubeIframeAPIReady".\r\n3) Create "var player = new YT.Player( ... );"\r\n4) At this point, any property or method such as "getPlayerState" should be defined. But it\'s not. It can take anywhere from 7 to 40 seconds depending on Dullahan version for it to become defined & the player to start playing the video. It can take even longer for the player\'s UI controls to finally load. By that I mean the controls become highlighted but pressing any button does nothing until it is loaded.\r\n\r\nIt might not be specific to Youtube API, but rather loading Javascript files asynchronously.',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'System': 'SL Viewer',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'The Youtube Player takes anywhere from 7 to 40 seconds to load under most conditions. First there is a white screen for a period (even though the webpage is fully loaded). Second there is a black screen for a period. Then the video loads and plays, but then under some conditions the controls take an additional 20-30 seconds to become responsive.',
  'What were you doing when it happened?': 'Try to play any Youtube Video through their embedding API.',
  'What were you expecting to happen instead?': "The video to play instantly the moment the API tells me that it's ready to play videos.",
}
@sl-service-account
Copy link
Author

Dan Linden commented at 2021-02-19T21:43:14Z

Thank you for the report, omoMMomo!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant