📜  加载 youtube iframe 播放器 api - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:24.153000             🧑  作者: Mango

代码示例1
// This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);