Socket
Socket
Sign inDemoInstall

youtube-video

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube-video

Minimalistic API to play Youtube videos


Version published
Maintainers
1
Weekly downloads
18
decreased by-21.74%

Weekly downloads

Readme

Source

youtube-video

Minimalistic API to play Youtube videos

youtubeVideo = require('youtube-video')
youtubeVideo('sl1Q6W0UzGk', {
  elementId: 'foobar',
  width: 640,
  height: 390,
  autoplay: true,
  controls: false,
  onPlay: onPlay,
  onEnd: onEnd,
  onPause: onPause
})
  • Demo: http://requirebin.com/embed?gist=6774318
  • Source code: http://requirebin.com/?gist=6774318

Install

$ npm install youtube-video

API

youtubeVideo(video-id or video-url, onReady)

youtubeVideo('https://www.youtube.com/watch?v=rfh4Mhp-a6U', function (error, playback) {
  playback.playVideo()
})

youtubeVideo(video-id or video-url, options, onReady)

youtubeVideo = require('youtube-video')
youtubeVideo('sl1Q6W0UzGk', {
  elementId: 'player', // by default: youtube-video
  width: 640,
  height: 390,
  autoplay: true,
  controls: false,
  onPause: onPause,
  onPlay: onPlay,
  onEnd: onEnd
})

Keywords

FAQs

Last updated on 15 Feb 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc