Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
180 views
in Technique[技术] by (71.8m points)

Is it correct non-documented solution for Opentok react-native

I faced an issue dealing with relocating video streams inside the grid.

For example, when we want to Pin 1 or 2 video streams to the top of the screen. That 1 or 2 video streams belong to users with specific role. I.E. that streams should always be at the top of the screen. But since this is multiple users session and on one device publisher has this specific role and on other device that role belongs to a subscriber we can’t pin that specific stream to the top using components layout from documentation.

We used undocumented approach, in detail - element OTPublisher is located inside the element OTSubscriber.

Although - based on documentation - the markup should be the following:

<OTSession {…sessionProps}>
   <OTPublisher {...publisherProps} />
   <OTSubscriber {...subscriberProps}>
       ...
       <StreamView {...streamProps} />
       ...
   </OTSubscriber>
</OTSession>

So stream for Publisher and streams for Subscriber work separately. It is a normal grid when we want to get visually consistent grid of streams.

As for our case, to control and manipulate with the grid we located OTPublisher inside of the group of elements for OTSubscriber. The markup finally turned out to be:

<OTSession {…sessionProps}>
   <OTSubscriber {...subscriberProps}>
       <OTPublisher {...publisherProps} />
       ...
       <StreamView {...streamProps} />
       ...
   </OTSubscriber>
</OTSession>

It seems like working at first glance, but OTSession communicates by itself with child elements and we might face side effects (including critical) by violating standard structure of elements location inside OTSession.

Seems like this solution might be potentially unstable. Could you please review our solution for stability? We want to minimise risk of this solution to be broken by future Vonage/TokBox updates. Would you please share any comments that can make our solution to Pin and control grid stable

question from:https://stackoverflow.com/questions/65885879/is-it-correct-non-documented-solution-for-opentok-react-native

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...