javascript - 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
解决方案
如果您只想要视频的尺寸,HTML 视频元素的 videoWidth 和 videoHeight 属性允许查询。
https://webrtc.github.io/samples/src/content/getusermedia/canvas/显示了一个示例,包括如何将当前视频内容绘制到画布元素上。
推荐阅读
- java - 面临从数据库显示元素到表的问题
- sftp - 如何修复 SFTP 端口上的 WinSCP 错误“System.Xml.XmlException:缺少根元素”
- ruby-on-rails - 如何使用 rails 中的回形针 gem 从 URL 下载 Internet 图像?
- c# - Azure Functions - 拒绝访问路径
- javascript - GPU 绑定的动画是否仍受 CPU 负载的影响?
- r - 指示日期属于哪个时间间隔
- sql - 比较两个表中的两个值的最快方法
- javascript - 如何处理对 JavaScript 中不可访问/“不可见”属性的访问?
- angular - Ng2-NoUISlider 获得相同的范围值
- safari - CSS 关键帧和动画:脉冲在 Safari 上不起作用,边框半径不适用于脉冲效果