video
const video = document.getElementById('video')
video.addEventListener('canplay', function (e) {
const { videoWidth, videoHeight } = e.target
})
img
const img = new Image()
img.src = ''
img.onload = function() {
const { width, height } = img
}