Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
youtube-video-element
Advanced tools
<youtube-video>
A custom element
for the YouTube player with an API that matches the
<video>
API.
HTMLMediaElement
API<script type="module" src="https://cdn.jsdelivr.net/npm/youtube-video-element@1"></script>
<youtube-video controls src="https://www.youtube.com/watch?v=rubNgGj3pYo"></youtube-video>
<youtube-video>
is packaged as a javascript module (es6) only, which is supported by all evergreen browsers and Node v12+.
<script>
Note the type="module"
, that's important.
Modules are always loaded asynchronously by the browser, so it's ok to load them in the head :thumbsup:, and best for registering web components quickly.
<head>
<script type="module" src="https://cdn.jsdelivr.net/npm/youtube-video-element@1"></script>
</head>
npm
npm install youtube-video-element --save
Or yarn
yarn add youtube-video-element
Include in your app javascript (e.g. src/App.js)
import 'youtube-video-element';
This will register the custom elements with the browser so they can be used as HTML.
<mux-video>
A Mux-flavored HTML5 video element w/ hls.js and Mux data builtin.<mux-player>
The official Mux-flavored video player web component.<vimeo-video>
A web component for the Vimeo player.<videojs-video>
A web component for Video.js.<wistia-video>
A web component for the Wistia player.<jwplayer-video>
A web component for the JW player.<hls-video>
A web component for playing HTTP Live Streaming (HLS) videos.castable-video
Cast your video element to the big screen with ease!FAQs
Custom element (web component) for the YouTube player.
The npm package youtube-video-element receives a total of 1,209 weekly downloads. As such, youtube-video-element popularity was classified as popular.
We found that youtube-video-element demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.