- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
const createOption = { video: { device: 'camera', resolution: { width: 720, height: 1280 }, }, audio: true, } Woogeen.LocalStream.create(createOption, (err, localStream) => { ... })
如果去掉 resolution 的话就能够正常创建。
该现象只出现在 Safari 11 上,在 Chrome 上正常。
CS for WebRTC ver 3.5 & 3.5 update 1 都存在这个问题。
- Tags:
- HTML5
- JavaScript*
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
报错内容:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
你摄像头支持这个分辨率吗? 如果720P 的话应该是
resolution: {width: 1280, height: 720},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
看来 Safari 不支持 resolution: { width: 720, height: 1280 } 因为报错 Invalid constraint
但是 Chrome 是支持的。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
我是为了模仿 9:16 竖屏,所以特别设定 resolution: { width: 720, height: 1280 }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Invalid constraint 这类错误就是表示你尝试创建一个不支持的分辨率的流报的错误
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page