Git Product home page Git Product logo

vr-multi-view's Introduction

VR Multi View

Prepare

Prepare 2 (or more) Android devices. One device is Gear VR compatible and another one is controller.

These devices have to be in the same local network.

How to use

  1. Create your osig files.
  2. Put your osig files into gearvr/src/main/assets/ directory.
  3. Open project with Android Studio.
  4. Build.
  5. Run gearvr module with Gear VR device and controller module with other Android device.

Use file chooser instead input dialog

Put multiview-files.txt in controller's root storage directory (/sdcard/). File paths are written in each lines. Example:

Oculus/360Videos/video.mp4
Oculus/360Videos/other-video.mp4
Oculus/360Videos/another-video.mp4

Basic messaging flow

  1. Gear VR : Broadcast own IP address to network by UDP
  2. Controller : Receive broadcast and establish WebSocket connection to IP address
  3. Gear VR : On receive WebSocket request, stop broadcasting
  4. Controller : Send media information by WebSocket
  5. Gear VR : Receive media information and process (load, seek, play and pause).
  6. Controller : Shutdown. Close WebSocket connection
  7. return to 1.

Config

Configurations are in common/src/main/res/values/common_config.xml

<resources>
    <integer name="broadcast_port">50122</integer>
    <integer name="websocket_port">50123</integer>
    <string name="websocket_protocol">vrmultiview</string>
</resources>

broadcast_port

UDP broadcast port. UDP Broadcast is used in device searching phase. Gear VR sends its IP address, WebSocket port, and protocol at regular intervals by UDP broadcast. When controller receives this packet, controller will create WebSocket connection to Gear VR. Broadcast message is a JSON string which represents GearVRDeviceInfo object. This can be changed independently from websocket_port.

websocket_port

WebSocket port. WebSocket is used to control Gear VR from controller. WebSocket message is a JSON string which represents ControlMessage object. This can be changed independently from broadcast_port.

websocket_protocol

WebSocket protocol can be changed to any string. Change this to prevent connection from malicious programs.

Icons

Icons are licensed by Creative Commons 3.0 https://creativecommons.org/licenses/by/3.0/us/

Auther links

Controller app icon https://thenounproject.com/esteves_emerick

Gear VR app icon https://thenounproject.com/Aliriza/

vr-multi-view's People

Contributors

niusounds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.