UNPKG

vuetube

Version:

A fast, lightweight, lazyload vue component acting as a thin layer over the YouTube IFrame Player API which renders fast

14 lines (11 loc) 334 B
import { YOUTUBE_API_URL } from '@/utils/constants'; /** * Load youtube API * @link https://developers.google.com/youtube/iframe_api_reference */ function loadYoutubeAPI(): void { const script = document.createElement('script'); script.src = YOUTUBE_API_URL; document.head.appendChild(script); } export { loadYoutubeAPI };