# Problem with additional parameters for video constrains

**URL:** <https://discourse.lynckia.com/t/problem-with-additional-parameters-for-video-constrains/508>\
**Category:** Support\
**Created:** [June 3, 2017, 1:31pm UTC](https://discourse.lynckia.com/t/problem-with-additional-parameters-for-video-constrains/508 "2017-06-03T13:31:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [June 3, 2017, 1:31pm UTC](https://discourse.lynckia.com/t/problem-with-additional-parameters-for-video-constrains/508/1 "2017-06-03T13:31:25Z")

</div>

What’s the difference between these two video constrains?

1. `{ data: false, audio: false, video: true, videoSize: [320, 240, 640, 480] }`

2. `{ data: false, audio: false, video: { width: { min: 320, max: 640 }, height: { min: 240, max: 480 } } }`

They are producing the same video configuration in Chrome WebRTC Internals:

```auto
Video Constraints
{width: {min: 320, max: 640}, height: {min: 240, max: 480}}

```

By using the second one, video is published but subscription does not happen. I need the second format to set also the `sourceId`.

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [June 4, 2017, 5:06am UTC](https://discourse.lynckia.com/t/problem-with-additional-parameters-for-video-constrains/508/2 "2017-06-04T05:06:31Z")

</div>

I also tried this with no luck:

```auto
{ data: false, audio: false, video: {
  mandatory: { minWidth: 320, maxWidth: 640, minHeight: 240, maxHeight: 480 }
}}

```

Here’s the created offer for the subscriber from Chrome WebRTC Internals:

**createOffer:**

```auto
constraints: {{offerToReceiveAudio: {exact: 0}, offerToReceiveVideo: {exact: 0}}}

```

---

<div class="post-metadata">

**Author:** ![mkh](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/mkh/32/38_2.png) [@mkh](https://discourse.lynckia.com/u/mkh)\
**Post date:** [June 4, 2017, 7:00am UTC](https://discourse.lynckia.com/t/problem-with-additional-parameters-for-video-constrains/508/3 "2017-06-04T07:00:32Z")

</div>

I also discovered that setting `videoFrameRate` which produces the following constraints does not work:

```auto
{advanced: [{frameRate: {min: 5}}, {frameRate: {max: 15}}]}

```

But if I set the frame rate directly in to the video config in Stream.js then I got this that works well:

```auto
{frameRate: {min: 5, max: 15}}

```
