Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

ScreenShare stream question

Avatar

Level 1

Hi,

the share screen stream descriptor publisherid has '/2' at the end,

so the getStreamDescriptor method can not be checked against the regular userid without adding '/2' at the end,

Will this always be like that ?

4 Replies

Avatar

Former Community Member

Hi there,

Under the hood, what's happening is that there really are 2 client apps :

the browser-based one, and the addin. If you need the streamdescriptor, you

can always get all streams of type screen :

var allSSStreams:Object =

streamManager.getStreamsOfType(StreamManager.SCREENSHARE_STREAM);

and then loop to find one which has the "originalScreenPublisher" equal to

your userId. You can also listen to the streamReceive event as streams are

created to find the one you're looking for (it will have the

streamDescriptor attached, which will have the "originalScreenPublisher"

property as well).

hope that helps

nigel

Avatar

Level 1

All right,thanks.

I will use streamManager.getStreamDescriptor() and add "/2" for screen share streams. It's more compact.

But why don't you check the userid against the originalScreenPublisher for "screenShare" types in that method ?

Avatar

Former Community Member

Re: "/2" - It's possible this won't always work (for example, if you've got

2 clients open for the same user already, launching screensharing might be

"/3"). What's the context for when you need to look up the stream

descriptor?

Your suggestion is something I thought about too. I'm still not sure I'd

want to redefine one of the base methods for the StreamManager though. Maybe

a higher order method which does this (maybe on ScreenShareSubscriber or

ScreenSharePublisher) would be more appropriate.

nigel

Avatar

Level 1

Ok, thanks for pointing that out.

I use it when I update the connected users list on stream or user events.

Each list item has three icons to display if camera,audio or screen share is active for that user.

so I check if getStreamDescriptor(type,userid) is null or not for all three stream types for each connected user.