我可以在未经浏览器许可的情况下接收视频以在 SimpleWebRTC 中使用我的相机吗? [英] Can I receive video without giving permission to browser to use my camera in SimpleWebRTC?

查看:26
本文介绍了我可以在未经浏览器许可的情况下接收视频以在 SimpleWebRTC 中使用我的相机吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SimpleWebRTC 是否有这个功能可以在不授权浏览器使用我的相机/麦克风的情况下获取数据(视频/音频)?

Does SimpleWebRTC has this feature to get data(video/audio) without giving permission to browser to use my camera/microphone?

// create our webrtc connection
var webrtc = new SimpleWebRTC({
    // the id/element dom element that will hold "our" video
    localVideoEl: 'localVideo',
    // the id/element dom element that will hold remote videos
    remoteVideosEl: '',
    // immediately ask for camera access
    **autoRequestMedia: true,**
    debug: true,
    detectSpeakingEvents: true,
    autoAdjustMic: false,
    media: {
        video: false,
        **audio: true**
    },
});

当我将那些被星号包围的部分更改为 true 时,它​​会起作用,否则不会.

When I change those parts surrounded by asterisks to true it works, otherwise it doesn't.

推荐答案

您是否尝试过将 autoRequestMedia 设置为 true 并将媒体对象的视频和音频都设置为 false?您应该会收到 readyToCall 事件,并且可以如 simplewebrtc 主页所示加入房间.

Have you tried setting autoRequestMedia to true and while having both video and audio of the media object set to false? You should receive the readyToCall event and can join the room as shown on the simplewebrtc homepage.

这篇关于我可以在未经浏览器许可的情况下接收视频以在 SimpleWebRTC 中使用我的相机吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆