OmniVirt VR Player makes the leading player for 360° video experiences across mobile and desktop. Upload your 360° content to OmniVirt and serve it into your app with few easy steps.
OmniVirt Ad Network provides you an advertising platform enables developers and publishers to monetize their apps with engaging VR content in seamless user experience way.
Simply integrate the OmniVirt SDK into your iOS, Android or Web application and get paid for presenting sponsored 360° video experiences to your users. Backfill your inventory with premium CPM experiences from OmniVirt’s network of advertisers. We support both 360° and 2D video ads inside VR apps.
Contact us for more info at contact@omnivirt.com. Visit www.omnivirt.com to upload content or create ad space.
$ yarn add omnivirt-react-native-sdk --save
$ react-native link omnivirt-react-native-sensors
$ react-native link omnivirt-react-native-webview
import {VRPlayer, Feature, Mode, Quality} from "omnivirt-react-native-sdk"
Please add the following code in render():
<VRPlayer ref="vrPlayer" />
Please add the following code in componentDidMount():
this.refs.vrPlayer.load(CONTENT_ID)
Don't forget to change the CONTENT_ID into your creative id, for example: 24.
<VRPlayer ref="vrPlayer"
onExpanded={this.handleOnExpanded.bind(this)}
onCollapsed={this.handleOnCollapsed.bind(this)} />
Adding the following into your component:
handleOnExpanded(player) {
this.setState({
isPlayerInFullscreenMode: true
})
}
handleOnCollapsed(player) {
this.setState({
isPlayerInFullscreenMode: false
})
}
You have to manage the expandable layout by yourself.
play()
pause()
expand()
collapse()
back()
skip()
cardboard { get; set }
audio { get; set }
quality { get; set }
interface { get; set }
duration { get; }
progress { get; }
buffer { get; }
seek { get; set }
latitude { get; set }
longitude { get; set }
idle { get; set }
enable(feature)
disable(feature)
switchScene(name)
sendMessage(command, data)
receiveMessage(command, refFunction: (command: String, data: Object, player: Object) => {})
unbind(command, refFunction: (command: String, data: Object, player: Object) => {})
onLoaded={(player: Object, maximumQuality: Quality, currentQuality: Quality, currentCardboardMode: Mode) => {}}
onStarted={(player: Object) => {}}
onPaused={(player: Object) => {}}
onEnded={(player: Object) => {}}
onSkipped={(player: Object) => {}}
onDurationChanged={(player: Object, value: Double) => { /* 0.0 to 1.0 */ }}
onProgressChanged={(player: Object, value: Double) => { /* 0.0 to 1.0 */ }}
onBufferChanged={(player: Object, value: Double) => { /* 0.0 to 1.0 */ }}
onSeekChanged={(player: Object, value: Double) => { /* 0.0 to 1.0 */ }}
onCardboardChanged={(player: Object, mode: Mode) => {}}
onVolumeChanged={(player: Object, value: Double) => { /* 0.0 to 1.0 */ }}
onQualityChanged={(player: Object, quality: Quality) => {}}
onExpanded={(player: Object) => {}}
onCollapsed={(player: Object) => {}}
onLatitudeChanged={(player: Object, value: Double) => { /* -90 to 90 */ }}
onLongitudeChanged={(player: Object, value: Double) => { /* 0 to 360 */ }}
onSwitched={(player: Object, sceneName: String, historyStack: [String]) => {}}
Please email us at contact@omnivirt.com