Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

React + videojs-contrib-hls error in chrome and firefox, safari is ok #1356

Closed
int618 opened this issue Feb 28, 2018 · 1 comment
Closed

Comments

@int618
Copy link

int618 commented Feb 28, 2018

Description

React + videojs-contrib-hls error in chrome and firefox, safari is ok

Sources

import videojs from 'video.js';
import 'video.js/dist/video-js.css';
window.videojs = videojs;
require('videojs-contrib-hls');
export default class VideoPlayer extends Component {
componentDidMount() {
this.player = videojs('vjsplayer');
}
render() {
return(<video id='vjsplayer' className="video-js" controls>
<source src="http://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8 " type="application/x-mpegURL" />
</video>)
}
}

Steps to reproduce

  1. this.player = videojs('vjsplayer'); error
    2.application/x-mpegURL type not supported。load http://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8 failure。

Error output

Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys ()
at module.exports (index.js:10)
at new MasterPlaylistController (master-playlist-controller.js:314)
at HlsHandler.src (videojs-contrib-hls.js:335)
at Object.handleSource (videojs-contrib-hls.js:623)
at Html5.Tech.setSource (video.cjs.js:9000)
at new Html5 (video.cjs.js:16506)
at Player.loadTech
(video.cjs.js:19219)
at Player.src_ (video.cjs.js:20832)
at video.cjs.js:20779
at setSourceHelper (video.cjs.js:9133)
at setSourceHelper (video.cjs.js:9135)
at Player. (video.cjs.js:9055)
at bound (video.cjs.js:2282)

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

videojs-contrib-hls 5.12.2

videojs version

video.js 6.6.3

Browsers

chrome 64.0.3282.186
firefox 58.0.2

Platforms

OS X EI Capitan 10.11.6

@int618
Copy link
Author

int618 commented Mar 1, 2018

see #600

@int618 int618 closed this as completed Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant