You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
You can not do this. The index.js is running in a web worker, and all messages sent via NativeModule to it is JSON stringed and sent via postMessage, a mediaStream is not able to stringify to a JSON.
Despite from that, why would you want to send a media stream to react side(index.js)?
If you want some information about the stream to be used by react code, please extract those properties out and send them instead.
If you want to play the media, you can't directly play the media on react side(index.js). You should do it on client side(client.js). E.g, save the media stream in your native module, and then use native module function call from react side to trigger the playing or other controls that runs in native module.
Description
When defining a Native Module that calls getUserMedia, I am unable to pass the resulting Media Stream back to index.js.
Expected behavior
When the Promise in my Native Module resolves with a Media Stream, that Media Stream will be available in index.js.
Actual behavior
When the Promise in my Native Module resolves with a Media Stream, that Media Stream is not available in index.js, instead it is an empty object.
Reproduction
Native Module:
Logs:
MediaStream {id: "Efr55Nh1C0n9H5heZTk5NMi1CaEYnbSPsFYQ", active: true, onaddtrack: null, onremovetrack: null, onactive: null, …}
index.js:
Logs:
{}
Additional Information
The text was updated successfully, but these errors were encountered: