首页 > 解决方案 > How to detect camera orientation javascript webrtc

问题描述

How can I use image processing method when computer's camera has for example 640x480 resolution and phone's one 480x640

标签: javascriptandroidmobilebrowserwebrtc

解决方案


如果您只想要视频的尺寸,HTML 视频元素的 videoWidth 和 videoHeight 属性允许查询。

https://webrtc.github.io/samples/src/content/getusermedia/canvas/显示了一个示例,包括如何将当前视频内容绘制到画布元素上。


推荐阅读