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

Uncaught TypeError: a.on is not a function #71

Open
ghost opened this issue Aug 17, 2018 · 1 comment
Open

Uncaught TypeError: a.on is not a function #71

ghost opened this issue Aug 17, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 17, 2018

Hello, we're trying to set video.js and player.js on our WordPress install so we can meet requirements for being a embed.ly provider.

I have all of the sciprts correctly loaded, and I've added the simple adapter code:

videojs("#video_kgvid_0", {}, () => {
    const adapter = new playerjs.VideoJSAdapter(this);
    // ... Do other things to initialize your video.

    // Start accepting events
    adapter.ready();
});

Notice the #video_kgvid_0 tag is from a wordpress plugin that adds support to video.js, and also adds the scripts to the oembed page.

The full error:

Uncaught TypeError: a.on is not a function
    at d.VideoJSAdapter.init (player-0.1.0.min.js:1)
    at new d.VideoJSAdapter (player-0.1.0.min.js:1)
    at b.videojs (oembed.js?ver=0.3.0:1)
    at b.<anonymous> (video.js?ver=5.20.2:1)
    at Array.forEach (<anonymous>)
    at b.<anonymous> (video.js?ver=5.20.2:1)
    at e (video.js?ver=5.20.2:1)

And here you can see the page live.

What am I doing wrong?

@Sebschock
Copy link

Hi, I'm experiencing the same issue when using the VideoJSAdapter. Pleas help.

[Error] TypeError: a.on is not a function. (In 'a.on("pause",function(){b.emit("pause")})', 'a.on' is undefined)
	init (player-0.1.0.min.js:1:12757)
	VideoJSAdapter (player-0.1.0.min.js:1:12581)
	(anonym funktion) (44:111)
	(anonym funktion) (video.js:3731)
	forEach
	(anonym funktion) (video.js:3730)
	bound (video.js:2168)
	(anonym funktion) (video.js:4367)

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