viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.29k stars 481 forks source link

Get url of temporary video file at the beginning of recording. #514

Open MayeulGarreau opened 5 years ago

MayeulGarreau commented 5 years ago

Environment

  1. Development OS: Windows
  2. Device OS: Android 8.0.0
  3. Viro React 2.12.0 and React Native 0.55.3
  4. Device: Samsung Galaxy S7

Description

Hi!

Thanks again for your amazing work on react-native and AR, it's really motivating to work with Viro!

I am working on a use case where it is necessary to livestream a ViroARScene to a server. The startVideoRecording() method from ViroARSceneNavigator seems to be a good start.

I investigated a little and the following article kind of describe the main steps of what I think I want to do (except it's for RNCamera): https://medium.com/react-native-training/build-youtube-alike-livestreams-with-react-native-8dde24adf543

According to this article, in order to achieve livestream I need to get a file path of the file being written at the beginning of the recording.

Do you know how to get this path at this particular moment?

My excuse in advance if it is a silly question, I feel I'm missing something...

Have a good day,

Mayeul

dam00n commented 5 years ago

Hi @MayeulGarreau thanks for the positive feedback on Viro, glad you are enjoying developing on the platform.

ViroVideo utilizes Exoplayer (Android) and AVPlayer (iOS) so it is possible to render HLS Streams. We have not ourselves worked with livestreaming video but there are multiple developers on the Viro platform that are building apps that include livestreaming.

Here is a link to more info on HLS -> https://mux.com/blog/mobile-hls-guide/

MayeulGarreau commented 5 years ago

Hi @dam00n!

Thanks for the quick and accurate answer :) I’m a true beginner on HLS so I’m actually digging deeper into it.

I hopped there was a pure RN way to do it, but as far as I understand i’ll have to go native ahah may the force be with me!