JS获取video原始宽高
程序员文章站
2022-06-21 15:06:31
...
var video = document.querySelector('video');
video.addEventListener('canplay', function () {
this.width = this.videoWidth;
this.height = this.videoHeight;
});
参考地址,https://blog.csdn.net/weixin_33690963/article/details/91697691