amateur
amateur

Reputation: 51

Can I receive video without giving permission to browser to use my camera in 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**
    },
});

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

Upvotes: 0

Views: 491

Answers (2)

Plamen Peshev
Plamen Peshev

Reputation: 410

First negotiate (accept the call/join the room) with video and audio and then disable the video, somehting like webrtc.videoStreams.disable()

Upvotes: 0

Philipp Hancke
Philipp Hancke

Reputation: 17330

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.

Upvotes: 1

Related Questions