Created
August 27, 2022 15:48
-
-
Save el3um4s/2e906ff421979b3c29ac9074bc99a7e5 to your computer and use it in GitHub Desktop.
MEDIUM - How To Create a Simple YouTube Player With JavaScript - 03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as YouTube from "./youTube.js"; | |
export async function createVideo(iframeId) { | |
Globals.ytPlayer[iframeId]["player"] = await YouTube.CreatePlayer(iframeId, { | |
onStateChange: (e) => { | |
console.log(e.data); | |
}, | |
onReady: (e) => { | |
console.log(e); | |
}, | |
}); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment