Skip to content

Instantly share code, notes, and snippets.

@el3um4s
Created August 27, 2022 15:51
Show Gist options
  • Save el3um4s/a61027d2c0cf473d78df277ec5324f21 to your computer and use it in GitHub Desktop.
Save el3um4s/a61027d2c0cf473d78df277ec5324f21 to your computer and use it in GitHub Desktop.
MEDIUM - How To Create a Simple YouTube Player With JavaScript - 07
export function loadVideoById(iframeId, videoId) {
Globals.ytPlayer[iframeId]["player"].loadVideoById(videoId);
}
export function loadVideoByUrl(iframeId, videoId) {
Globals.ytPlayer[iframeId]["player"].loadVideoByUrl(videoId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment