# Re-using or passing a custom stream in react-native/ios/android libs?

**URL:** <https://forum.deepar.ai/t/re-using-or-passing-a-custom-stream-in-react-native-ios-android-libs/405>\
**Category:** SDK\
**Created:** [August 24, 2023, 2:33pm UTC](https://forum.deepar.ai/t/re-using-or-passing-a-custom-stream-in-react-native-ios-android-libs/405 "2023-08-24T14:33:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavels](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/pavels/32/594_2.png) [@Pavels](https://forum.deepar.ai/u/Pavels)\
**Post date:** [August 24, 2023, 2:33pm UTC](https://forum.deepar.ai/t/re-using-or-passing-a-custom-stream-in-react-native-ios-android-libs/405/1 "2023-08-24T14:33:02Z")

</div>

Hi there,

I’m building an application using react-native lib. However, I can’t find a way to pass my own media stream or use the output stream for my purposes. Is it possible or not? I saw a way for web SDK, but couldn’t find a way for mobile app.

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [August 28, 2023, 11:23am UTC](https://forum.deepar.ai/t/re-using-or-passing-a-custom-stream-in-react-native-ios-android-libs/405/2 "2023-08-28T11:23:51Z")

</div>

Hi, the react-native plugin is a third party demo so it doesn’t have all of the functions implemented but the native SDKs do have a way to achieve this, you can see some examples on GitHub

> **[DeepAR SDK](https://github.com/DeepARSDK?q=videocall&type=all&language=&sort=)**
>
> Face Masks, Lenses and Filters for any app with one SDK - DeepAR SDK

You can check out the Offscreen Rendering guides

> **[Offscreen Rendering Guide | DeepAR](https://docs.deepar.ai/deepar-sdk/deep-ar-sdk-for-ios/offscreen-rendering-guide/)**
>
> A cheat-sheet for offscreen rendering on iOS

> **[Offscreen Rendering Guide | DeepAR](https://docs.deepar.ai/deepar-sdk/deep-ar-sdk-for-android/offscreen-rendering-guide/)**
>
> A cheat-sheet for offscreen rendering on Android

rendered frames will be delivered through `frameAvailable` and from there you can feed them into whatever pipeline you need

---

<div class="post-metadata">

**Author:** ![morganee](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@morganee](https://forum.deepar.ai/u/morganee)\
**Post date:** [April 4, 2025, 9:42am UTC](https://forum.deepar.ai/t/re-using-or-passing-a-custom-stream-in-react-native-ios-android-libs/405/3 "2025-04-04T09:42:19Z")

</div>

> [@Pavels](#):
>
> I’m building an application using react-native lib. However, I can’t find a way to pass my own media stream or use the output stream for my purposes. Is it possible or not? I saw a way for web SDK, but couldn’t find a way for mobile app.

**Hi!** Yes, it is possible to work with media streams in React Native, but it depends on the library you’re using. If you’re referring to WebRTC (e.g., `react-native-webrtc`), you can pass and manipulate media streams using `getUserMedia()` for capturing audio/video and `RTCPeerConnection` for handling streams. Unlike the web SDK, React Native requires native module support, so ensure you have the right permissions set up and that your implementation aligns with the platform’s constraints. If you need more specific guidance, could you share which library you’re using and your exact use case? I’d be happy to help!
