Search code examples
javascriptcameratwiliowebrtc

Twilio Programmable Video using a PTZ Camera


I am using Twilio Javascript SDK in the Electron app. I want to use the PTZ camera for publishing the video track during the call and use the camera abilities to publish the video accordingly. Is there any such way to perform such actions using the Twilio Programmable Video?


Solution

  • Twilio developer evangelist here.

    When creating tracks to use with Twilio Video, you can either take tracks you have already got via getUserMedia:

    Video.connect(token, { tracks: tracks });
    

    Or you can pass any media constraints via the video option to the connect function:

    Video.connect(token, { video: { pan: true }});