aullman / opentok-meet

Opentok app with screen sharing using the WebRTC screen sharing feature
MIT License
133 stars 129 forks source link

Not able to get stream id of the person who publishes the feed #222

Closed UpadhyayShubham closed 5 years ago

UpadhyayShubham commented 5 years ago

Hi Adam

I am stuck and I need your help. I am unable to get the "stream_id" of the published stream. I have to receive it on the subscriber's end and then send it through signalling to the server to change the "Archiving Layout".

I am trying to create a scenario in which a person's camera feed would come in horizontal layout and if the screen is shared then the screen would be with focus class. I am trying to achieve this when no other person (or subscriber) is in the room. I am making a platform to create tutorials.

Any help would be appreciated. Thanks

aullman commented 5 years ago

I would listen for the "streamCreated" Event in the controller. You could do that when we startArchiving here. Then if the stream is a screen make the API call to make it the focused stream. Also make sure to remove the event listener for streamCreated when we stop archiving. You will also want to iterate through all of the existing streams when you start archiving as well and check for screen sharing streams.

Please feel free to submit a PR for this. Others have requested this feature https://github.com/aullman/opentok-meet/issues/146

UpadhyayShubham commented 5 years ago

Thanks a lot Adam.