# Stream can't be subscribed with optional constraints for video

**URL:** <https://discourse.lynckia.com/t/stream-cant-be-subscribed-with-optional-constraints-for-video/170>\
**Category:** Uncategorized\
**Created:** [August 20, 2015, 4:41pm UTC](https://discourse.lynckia.com/t/stream-cant-be-subscribed-with-optional-constraints-for-video/170 "2015-08-20T16:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![1111](https://avatars.discourse-cdn.com/v4/letter/1/71e660/32.png) [@1111](https://discourse.lynckia.com/u/1111)\
**Post date:** [August 20, 2015, 4:41pm UTC](https://discourse.lynckia.com/t/stream-cant-be-subscribed-with-optional-constraints-for-video/170/1 "2015-08-20T16:41:30Z")

</div>

Hi, I’m trying to stream rear camera on android device.

I have id of rear camera and trying to create stream like:

var config = {  
video : {optional : [{sourceId : [source.id](http://source.id)},  
audio : !VideoCC\_Shopper.service.Sip.SOUND\_OVER\_SIP,  
data : true,  
attributes : {  
agent : agent,  
type : streamType  
}  
};

var stream = new Erizo.Stream(config);

On phone I can view this lcaol stream.

But another client can’t subscribe to this stream - stream-subscribed event doesn’t fired.

Another client can successfully subscribe when I change video to video:true in my config.

Could you suggest, can I use rear camera with Licode?

---

<div class="post-metadata">

**Author:** ![1111](https://avatars.discourse-cdn.com/v4/letter/1/71e660/32.png) [@1111](https://discourse.lynckia.com/u/1111)\
**Post date:** [September 18, 2015, 7:30am UTC](https://discourse.lynckia.com/t/stream-cant-be-subscribed-with-optional-constraints-for-video/170/2 "2015-09-18T07:30:05Z")

</div>

> up
> 
> Is there any updates/ suggestions?  
> Now I just changed sources of erizo client to support optional media  
> constrains.
