app/src/main/java/fi/finwe/orion360/sdk/pro/examples/layout/RecyclerViewLayout.java
public void play(String contentUri, final float volumeLevel) {

            // Create a new scene. This represents a 3D world where various objects can be placed.
            mScene = new OrionScene();

            // Bind sensor fusion as a controller. This will make it available for scene objects.
            mScene.bindController(mOrionContext.getSensorFusion());

            // Create a new panorama. This is a 3D object that will represent a spherical video.
            mPanorama = new OrionPanorama();

            // Create a new video (or image) texture from a video (or image) source URI.
            mVideoPlayer = new AndroidMediaPlayerWrapper(RecyclerViewLayout.this);
            mPanoramaTexture = new OrionVideoTexture(mVideoPlayer, contentUri);

            // Set volume level when content has been prepared.
            ((OrionVideoTexture) mPanoramaTexture).addTextureListener(
                    new OrionVideoTexture.ListenerBase() {
                @Override
                public void onVideoPrepared(OrionVideoTexture orionVideoTexture) {
                    mVideoPlayer.setVolume(volumeLevel);
                }
            });

            // Bind the panorama texture to the panorama object.
            mPanorama.bindTextureFull(0, mPanoramaTexture);

            // Bind the panorama to the scene. This will make it part of our 3D world.
            mScene.bindSceneItem(mPanorama);

            // Create a new camera. This will become the end-user's eyes into the 3D world.
            mCamera = new OrionCamera();

            // Bind camera as a controllable to sensor fusion.
            mOrionContext.getSensorFusion().bindControllable(mCamera);

            // Bind the scene to the view. This is the 3D world that we will be rendering.
            mOrionView.bindDefaultScene(mScene);

            // Bind the camera to the view. We will look into the 3D world through this camera.
            mOrionView.bindDefaultCamera(mCamera);

            // The view can be divided into one or more viewports.
            mOrionView.bindViewports(OrionViewport.VIEWPORT_CONFIG_FULL,
                    OrionViewport.CoordinateType.FIXED_LANDSCAPE);
        }
/**
         * Plays the given content using Orion360.
         *
         * This is a very simple implementation that just initializes Orion360 for playback.
         *
         * @param contentUri the URI where from the content can be played.
         * @param volumeLevel the volume level for the content to be played.
         */
Plays the given content using Orion360.
This is a very simple implementation that just initializes Orion360 for playback.

@param contentUri the URI where from the content can be played.
@param volumeLevel the volume level for the content to be played.
Plays the given content using Orion360 . This is a very simple implementation that just initializes Orion360 for playback . @param contentUri the URI where from the content can be played . @param volumeLevel the volume level for the content to be played .
public void play(String contentUri, final float volumeLevel) {
            mScene = new OrionScene();
            mScene.bindController(mOrionContext.getSensorFusion());
            mPanorama = new OrionPanorama();
            mVideoPlayer = new AndroidMediaPlayerWrapper(RecyclerViewLayout.this);
            mPanoramaTexture = new OrionVideoTexture(mVideoPlayer, contentUri);
            ((OrionVideoTexture) mPanoramaTexture).addTextureListener(
                    new OrionVideoTexture.ListenerBase() {
                @Override
                public void onVideoPrepared(OrionVideoTexture orionVideoTexture) {
                    mVideoPlayer.setVolume(volumeLevel);
                }
            });
            mPanorama.bindTextureFull(0, mPanoramaTexture);
            mScene.bindSceneItem(mPanorama);
            mCamera = new OrionCamera();
            mOrionContext.getSensorFusion().bindControllable(mCamera);
            mOrionView.bindDefaultScene(mScene);
            mOrionView.bindDefaultCamera(mCamera);
            mOrionView.bindViewports(OrionViewport.VIEWPORT_CONFIG_FULL,
                    OrionViewport.CoordinateType.FIXED_LANDSCAPE);
        }
public void play ( String contentUri , final float volumeLevel ) { mScene = new OrionScene ( ) ; mScene . bindController ( mOrionContext . getSensorFusion ( ) ) ; mPanorama = new OrionPanorama ( ) ; mVideoPlayer = new AndroidMediaPlayerWrapper ( RecyclerViewLayout . this ) ; mPanoramaTexture = new OrionVideoTexture ( mVideoPlayer , contentUri ) ; ( ( OrionVideoTexture ) mPanoramaTexture ) . addTextureListener ( new OrionVideoTexture . ListenerBase ( ) { @ Override public void onVideoPrepared ( OrionVideoTexture orionVideoTexture ) { mVideoPlayer . setVolume ( volumeLevel ) ; } } ) ; mPanorama . bindTextureFull ( 0 , mPanoramaTexture ) ; mScene . bindSceneItem ( mPanorama ) ; mCamera = new OrionCamera ( ) ; mOrionContext . getSensorFusion ( ) . bindControllable ( mCamera ) ; mOrionView . bindDefaultScene ( mScene ) ; mOrionView . bindDefaultCamera ( mCamera ) ; mOrionView . bindViewports ( OrionViewport . VIEWPORT_CONFIG_FULL , OrionViewport . CoordinateType . FIXED_LANDSCAPE ) ; }
Plays the given content using Orion360.
Plays the given content using Orion360 .
// Create a new scene. This represents a 3D world where various objects can be placed. // Bind sensor fusion as a controller. This will make it available for scene objects. // Create a new panorama. This is a 3D object that will represent a spherical video. // Create a new video (or image) texture from a video (or image) source URI. // Set volume level when content has been prepared. // Bind the panorama texture to the panorama object. // Bind the panorama to the scene. This will make it part of our 3D world. // Create a new camera. This will become the end-user's eyes into the 3D world. // Bind camera as a controllable to sensor fusion. // Bind the scene to the view. This is the 3D world that we will be rendering. // Bind the camera to the view. We will look into the 3D world through this camera. // The view can be divided into one or more viewports.