Overriding the Html5 tech causes error on videos without plugins
See original GitHub issueIssue Description
Description
Can’t play video without wavesurfer set up in plugins.
Steps to reproduce
In the video example, change var player to:
var player = videojs('myVideo', {
controls: true,
autoplay: false,
fluid: false,
loop: false,
width: 600,
height: 300,
sources: [{ src: 'media/example.mp4' }]
(Remove plugins, add sources, change autoplay)
Results
Expected
Video to play normally without wavesurfer plugins set up. (I want to have multiple videos on a page, some with wavesurfer, some without)
Actual
Unresponsive controls on video(s) without wavesurfer set up.
Error output
Firefox: _this.activePlayer.activeWavesurferPlugin is undefined
Chrome:
Uncaught TypeError: Cannot read property 'on' of undefined
at new WavesurferTech (videojs.wavesurfer.js:88)
at e.loadTech_ (video.min.js:6)
at e.src_ (video.min.js:6)
at video.min.js:6
at $t (video.min.js:1)
at $t (video.min.js:1)
at e.<anonymous> (video.min.js:1)
at r (video.min.js:2)
Additional Information
The problem seems to be with overriding the Html5 tech. Changing line 1082 in videojs.wavesurfer.js from
_video2.default.registerTech('Html5', _tech2.default);
to
_video2.default.registerTech('Wavesurfer', _tech2.default);
appears to fix this functionality, although videojs.wavesurfer.css is still in effect, which causes the time remaining and fullscreen icon to overlap.
versions
Using video.js 6.5.1 and wavesurfer.js 2.0.0-beta02 with videojs-wavesurfer 2.0.3 in Firefox Developer Edition 58 and Google Chrome 62 on Windows 10
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Pull request submitted
Sounds good, can you make a pull request?