video-dimensions

Returns the dimensions of given video

Returns the dimensions of given video

videoDimensions = require('video-dimensions')
 
video = document.querySelector('.video')
 
videoDimensions(video, function (widthheight) {
  width
  // => 500 
 
  height
  // => 300 
})
$ npm install video-dimensions