@@ -10,7 +10,7 @@ import './components';
1010import plugins from './plugins' ;
1111import Utils from './utils' ;
1212import defaults from './config/defaults' ;
13- import Eventable from './mixins/eventable ' ;
13+ import setupEventMethods from './utils/setup-event-methods ' ;
1414import ExtendedEvents from './extended-events' ;
1515import VideoSource from './plugins/cloudinary/models/video-source/video-source' ;
1616import {
@@ -35,7 +35,7 @@ Object.keys(plugins).forEach((key) => {
3535
3636overrideDefaultVideojsComponents ( ) ;
3737
38- class VideoPlayer extends Utils . mixin ( Eventable ) {
38+ class VideoPlayer {
3939
4040 static all ( selector , ...args ) {
4141 const nodeList = document . querySelectorAll ( selector ) ;
@@ -47,8 +47,6 @@ class VideoPlayer extends Utils.mixin(Eventable) {
4747 }
4848
4949 constructor ( elem , options , ready ) {
50- super ( ) ;
51-
5250 this . videoElement = elem ;
5351 this . options = splitOptions ( options ) ;
5452 this . _videojsOptions = this . options . videojsOptions ;
@@ -67,6 +65,9 @@ class VideoPlayer extends Utils.mixin(Eventable) {
6765
6866 this . videojs = videojs ( this . videoElement , this . _videojsOptions ) ;
6967
68+ // Setup event methods (on, one, off, trigger)
69+ setupEventMethods ( this , this . videojs ) ;
70+
7071 this . _isPlayerConfigValid = true ;
7172 if ( this . playerOptions . debug ) {
7273 isValidPlayerConfig ( this . options ) . then ( ( valid ) => {
0 commit comments