We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It works well in pc but fail at ios10 safiri ,the screen is black. here is the test link http://120.24.19.157:1233/
the main code
import React from 'react'; import videojs from 'video.js' import 'videojs-vr' import '../../../node_modules/video.js/dist/video-js.css' import '../../../node_modules/videojs-vr/dist/videojs-vr.css' export default class VideoPlayer extends React.Component { componentDidMount() { this.player = videojs(this.videoNode, this.props, function onPlayerReady() { console.log('onPlayerReady', this) const player = this player.mediainfo = player.mediainfo || {} player.mediainfo.projection = '360' player.vr({ projection: 'AUTO', debug: true, forceCardboard: false }) }) } // destroy player on unmount componentWillUnmount() { if (this.player) { this.player.dispose() } } // wrap the player in a div with a `data-vjs-player` attribute // so videojs won't create additional wrapper in the DOM // see https://github.com/videojs/video.js/pull/3856 render() { return ( <div data-vjs-player> <video ref={ node => this.videoNode = node } className="video-js"></video> </div> ) } }
my package.json
{ "name": "vr", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.2.0", "react-dom": "^16.2.0", "react-scripts": "1.1.0", "videojs-vr": "^1.0.3" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }
Anyone who solved this, please tell me your solution,thanks! It‘s hurry for me...
The text was updated successfully, but these errors were encountered:
I Don't think this is a react problem. This is likely a cross origin problem. Can you try the following:
crossorigin="anonymous"
Sorry, something went wrong.
Feel free to create another issue if this is still an issue
Note that in react it is crossOrigin="anonymous"
e.g
render() { return ( <div> <div data-vjs-player style={{ width: '100%', height: '500px' }}> <video ref={node => (this.videoNode = node)} className="video-js vjs-default-skin" crossOrigin="anonymous" /> </div> </div> ); }
No branches or pull requests
It works well in pc but fail at ios10 safiri ,the screen is black.
here is the test link http://120.24.19.157:1233/
the main code
my package.json
Anyone who solved this, please tell me your solution,thanks! It‘s hurry for me...
The text was updated successfully, but these errors were encountered: