Ziggeo/ziggeo-client-sdk

[Recorder] get recording from specific deviceId

Closed this issue · 4 comments

Hello everyone,

we're currently using the PRO plan but as result of an error we cannot record the HD video. In our application we wish to record the HD video (1080p or 1920x1080) by specifying an exact deviceId to ensure the right camera is choosen.

The problem

Under Firefox 71.0 with Fedora 30 we correctly record the video at the desired quality from the specified deviceId by using the method below.

Under Chrome 79 with Fedora 30 and Windows/MacOs too we have the error:

Uncaught (in promise) OverconstrainedError:
                                        name: "OverconstrainedError",
                                        message: null,
                                        constraint: "width",

How to reproduce

We use:

  • javascript recorder API;
  • access to private function of the recorder;
  • Chrome 79.
const ziggeoRecorder = new window.ZiggeoApi.V2.Recorder({
      element: ...,
      attrs: {
        width: 320,
        height: 160,
        skipinitial: true,
        gallerysnapshots: 0,
        countdown: 0,
        picksnapshots: false,
        recordingwidth: 1920,
        recordingheight: 1080,
        minuploadingwidth: 1920,
        minuploadingheight: 1080,
        noaudio: true
      }
    });
    
    ziggeoRecorder.activate();
    ziggeoRecorder.on("attached", () => {
        ...
        ziggeoRecorder.current.recorder._recorder.selectCamera(CORRECT_DEVICE_ID);
        ...
        ziggeoRecorder.current.record();
    });
    
 	ziggeoRecorder.on("processing",....);
 	ziggeoRecorder.on("uploading",....);
 	ziggeoRecorder.on("upload_progress",....);
    ...

Question

  1. What is the proper method to set a specific deviceId in the javascript recorder?
  2. What is the proper method to set the 1920x1080 stream resolution?

Thank you

Hello @lucailvec ,

This happens because recorded device capabilities are not matching with you desired capabilities. For Mac it's most time 720p (which makes 960x720) for front camera and it's not fit 1080p.

You can read more about OverconstrainedError

Thanks

Regarding questions:

  1. All devices will be listed by default, so you can switch between them.
  2. You can create profiles and transcode streams, also storing source stream.

Hello @lucailvec ,

This happens because recorded device capabilities are not matching with you desired capabilities. For Mac it's most time 720p (which makes 960x720) for front camera and it's not fit 1080p.

You can read more about OverconstrainedError

Thanks

I know. The our user interface play with the getUserMedia api and choose the right deviceId. This is a costraint of our product and we can't modify the UI/UX.
The camera we are currently using is a Logitech C922 HD Pro Webcam and other test executed in the browser reveal that record at the desired resolution is possible, the problem is how we use Ziggeo SDK...

....
2. You can create profiles and transcode streams, also storing source stream.

Profiles? Transcode streams? I don't understand how this can be a workaround.
Our tradeoff is record a video and store the entire chunks at the end of the recording if the Ziggeo SDK could let us to do this.