Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1146 Discussions

在 Safari 11 创建指定 resolution 的本地流时会报错

Li__Zunlong
New Contributor I
536 Views
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 都存在这个问题。

0 Kudos
5 Replies
Li__Zunlong
New Contributor I
536 Views

报错内容:

Screen Shot 2017-12-04 at 9.47.24 AM.png

0 Kudos
YanbinZ_Intel
Employee
536 Views

你摄像头支持这个分辨率吗? 如果720P 的话应该是

resolution: {width: 1280, height: 720},

 

0 Kudos
Li__Zunlong
New Contributor I
536 Views

看来 Safari 不支持 resolution: { width: 720, height: 1280 } 因为报错 Invalid constraint

但是 Chrome 是支持的。

0 Kudos
Li__Zunlong
New Contributor I
536 Views

我是为了模仿 9:16 竖屏,所以特别设定 resolution: { width: 720, height: 1280 }

0 Kudos
YanbinZ_Intel
Employee
536 Views

Invalid constraint  这类错误就是表示你尝试创建一个不支持的分辨率的流报的错误

0 Kudos
Reply