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

plyr.setup() throws error massage in console #717

Closed
drnkwati opened this issue Nov 18, 2017 · 8 comments
Closed

plyr.setup() throws error massage in console #717

drnkwati opened this issue Nov 18, 2017 · 8 comments

Comments

@drnkwati
Copy link

Hi
i keep getting this massage in my console when i try to setup with the plyr.setup() function
TypeError: 'matches' called on an object that does not implement interface Element
any ideas to why am getting this
thanks

@sampotts
Copy link
Owner

You probably passed the wrong argument to the setup function. I'd check that first. It will all change in the new version anyway.

@Inhakki
Copy link

Inhakki commented Feb 6, 2018

Any progress on this?

I'm having issues getting the demo through my NPM modules, there was a specific demo version that instantiated the instance using new Plyr('id', options) that suddenly disappeared. That was the most helpful because the current demos use plyr.setup() which doesn't seem to be working.

thanks

@friday
Copy link
Collaborator

friday commented Feb 6, 2018

@Inhakki: Use version 2 (plyr.setup()) and follow the documentation for version 2, or use the v3 beta (new Plyr()) and follow the docs for v3 beta. They're separate branches here. Nothing suddenly disappeared.

@Inhakki
Copy link

Inhakki commented Feb 6, 2018

@friday sorry, seems like I don't know how to use github.

I think there might be a real error though, because in my production server I am getting these errors

I used pretty much minimal setup

`import Plyr from 'plyr';
(function() {
document.addEventListener('DOMContentLoaded', function() {

    const plyr = new Plyr('#player', {
        autoplay: true,
        controls: [''],
        fullscreen: {
        	enabeled: false
        },
        loop: { 
        	active: true }
    });

});

})()
`

Seems like plyr triggers the 503 error somehow, as removing this portion of the JS makes the error disappear.

@friday
Copy link
Collaborator

friday commented Feb 6, 2018

@Inhakki Those look like valid plyr errors (except the third one). If you want to report them you should do so individually. Make sure that you are using the most recent plyr release (npm is recommended, but if you download from github use the "releases" tab and expand to show tags), search for existing issues to avoid creating a duplicate, and then follow the instructions in the issue template (specifying plyr version, browser, html5/vimeo/youtube etc).

The second one (503 error) is harmless I think. I've been getting it too but thought it was fixed in the latest beta releases. It is unrelated to the other errors.

The third on is due to vimeo limiting the free accounts I believe.

However: I would recommend v2 for everyone who can't fix, report or circumvent the type of errors that you've been getting until a stable v3 is released.

@friday
Copy link
Collaborator

friday commented Feb 17, 2018

@Inhakki: I commented about the [object%20Object] or in your case also "503" error here: #766 (comment)

@sampotts
Copy link
Owner

Closing this one as I think it's fixed but feel free to re-open if not solved in v3 👍

@tigusigalpa
Copy link

this error is because you didnt put the code in a load/ready context. For example, if you use it with jQuery, the code has to be like that
$( document ).ready(function() { const plyr = new Plyr('#player',{...}); });

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

5 participants