-1

Today, I started a project that requires 3D objects, 360 Images, and 360 videos on the frontend. So I decided to use the react 360 library since I am fairly knowledgable at react and javascript. Fortunately, I managed to easily make 360 images, but I found it really hard to create a 360 video. I tried so many ways but none of them worked. the documentation has just little explanation on how to create a 360 video, and I don't have any 3D related experience so it's really hard for me to figure out how to achieve this.

could you tell me how to create a 360 video with some sample code or example? or giving me some code example would be so appreciated as well.

I didn't post my code here cause what I wrote is really messy and useless here. thank you in advance !!

Shawn
  • 367
  • 4
  • 13

1 Answers1

0

index.js

import React from 'react';
import {
 Environment,
 asset,
 View
 } from 'react-360';

import VideoModule from 'VideoModule';

class Main extends React.Component {

    introVideo = VideoModule.createPlayer('introVideo')

    componentDidMount() {
        this.introVideo = VideoModule.createPlayer('introVideo')
        this.introVideo.play({
            source: { url: asset(`./video/name.mp4`).uri }
        })

        Environment.setBackgroundVideo('introVideo');
    }

    render() {
        return (
            <View/>
        )
    }
}

AppRegistry.registerComponent('Main', () => Main);