opentok / opentok-react-native

OpenTok React Native - a library for OpenTok iOS and Android SDKs
https://tokbox.com/
MIT License
209 stars 155 forks source link

OTPublisher/OTSubscriber does not pick sessionId prop when passed #722

Closed talhamuhammadashraf closed 4 months ago

talhamuhammadashraf commented 4 months ago

OTPublisher & OTSubscriber does not pick sessionId when passed in props.

Documentation says: sessionId (String) - The OpenTok session ID. This is auto-populated by wrapping OTPublisher/ OTSubscriber with OTSession, so you generally do not need to set this property for the OTPublisher.

So, internally it extracts it from OTContext, but it should get it from props as well when context is not there (when OTPublisher/ OTSubscriber.html is not wrapped with OTSession)

But, in case we have to render OTPublisher/ OTSubscriber.html somewhere else, not as children of OTSession and sessionId has been passed in props, it doesn't pick from props

beHaze commented 4 months ago

@talhamuhammadashraf Could you give us a little more info about your use case ? Could you achieve by modifying your css ?

beHaze commented 4 months ago

@talhamuhammadashraf we haven't heard back from you for a while, so we're closing this issue for now. Please, reach out if you still need help.

talhamuhammadashraf commented 4 months ago

Yeah still need help, Actually I want to keep OT session and Frames(Publishers and Subscribers) in separate hierarchy, both rendering as sibling nodes. And in that case, Frames(Publishers and Subscribers) wouldn't get sessionId directly populated because they are not wrapped in OTSession and I need to pass it to them through props but it does not work.

Reason for keeping separate is, we need to keep same architecture as that we are using on web(as that does not need to put publishers and subscribers as children of OTSession)