edx/edx-platform — pull request #1337 by singingwolfboy (2013-10-14 15:25:10+00:00)
Title: fix video module issue with require.js

Previously, the YouTube API and the Video Xmodule had a race condition -- Xmodule was waiting for the www.youtube.com/player_api script to load before executing the video scripts, but that file is just a loader that handles loading the real YouTube API. As a result, the real YouTube API and the Xmodule videoplayer were loaded simultaneously, and if Xmodule loaded before YouTube, the video would not display on the page. Fortunately, the YouTube API loader exposes a `YT.ready` function, that will execute its argument when the YouTube API is fully loaded, so it wasn't too difficult to make Xmodule wait until the YouTube API is fully loaded.