Skip to content
New issue

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

video.es.js:228 VIDEOJS: ERROR: TypeError: Cannot read properties of undefined (reading 'enabled') #1

Open
georgettelsf opened this issue Nov 7, 2022 · 0 comments

Comments

@georgettelsf
Copy link

Hello, I am trying to use this plugin but I am facing some issues. I am using the plugin in an Angular app/ Ionic app. The videojs version that I have installed in the project is "^7.20.3" and the plugin version is "^1.0.16".

I am initializing the library like this:

  ngOnInit() {
    this.player = videojs(this.target.nativeElement, this.options, function onPlayerReady() { });
    this.player.ads({
      debug: true
    });

    this.player.vast(
      {
        seekEnabled: true,
        controlsEnabled: true,
        wrapperLimit: 10,
        withCredentials: false,
        skip: 8,
        url: 'https://example'      
      }
    );
    this.player.src('example.mp4', 'application/x-mpegURL')
  }

But I am getting this error:

video.es.js:228 VIDEOJS: ERROR: TypeError: Cannot read properties of undefined (reading 'enabled')
at Vast._doPreroll (videojs-vast.js:3041:85)
at Player. (videojs-vast.js:2915:14)
at data.dispatcher (video.es.js:2311:31)
at trigger (video.es.js:2447:25)
at Player.trigger$1 [as trigger] (video.es.js:3388:12)
at videojs-vast.js:1818:15
at Preroll.afterLoadStart (videojs-vast.js:1785:8)
at Preroll.readyForPreroll (videojs-vast.js:1816:11)
at Preroll.handleAdsReady (videojs-vast.js:1772:11)
at Preroll.init (videojs-vast.js:1747:13)

Any ideas why I am getting this error?
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant