Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give access to Publisher instance #465

Open
kr1x opened this issue Jan 7, 2021 · 0 comments
Open

Give access to Publisher instance #465

kr1x opened this issue Jan 7, 2021 · 0 comments

Comments

@kr1x
Copy link

kr1x commented Jan 7, 2021

Feature Request

Description

I am currently trying to make a react-native app with a publisher screen. This screen displays my own camera and of course publishes it to a subscriber. My own camera resolution is 3:4 and therefor, the rest of the screen is black. Now I want to start an interval that fetches the current img data every 3 seconds and puts this as a blurred background image.

With the regular react-library I could just create a ref, hand it to the OTPublisher component and fetch the image by calling publisherRef.current.state.publisher.getImgData(). However, the react-native library only has true as a value of publisherRef.current.state.publisher, so I can't access the publisher instance directly.

After searching in the source code, I could not find any way to directly get the publisher instance.

Proposal

Store the publisher instance in the OTPublisher components state variable.

Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants