-
Notifications
You must be signed in to change notification settings - Fork 263
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
loadVideo doesnt call catch on error #57
Comments
Does it work with a div instead of an iframe? Possible overlap with #58 |
I have the same problem, I use a div not an iframe |
I discovered by chance, that you can get this to work by setting an error handler on the player. It doesn't matter what the handler does, it just needs to be there. Does not work:
( Does work:
Note that even though the handler is called, it still does not receive the |
@rijk That's an interesting workaround you found by chance, that definitely seems like unintended behaviour for sure. One should be able to rely on |
Hi @blackmambahk, @rijk, @mirague and others- You are correct to assume that |
Expected Behavior
The example code in the docs for loadVideo shows catching a 'PrivacyError' when loading a password protected resource.
Actual Behavior
A catch handler never gets called
Steps to Reproduce
If you try in the demo app to load a password protected resource it loads and displays the login screen as expected but the log shows no error output, and a breakpoint on line 409 of api-demo.js also never gets hit.
Tried it in my own local code first and had same issue. Although the rather than display the login it displays 'unhandled privacy error'.
This also raises another question, there seems no way to create a player without first setting a video url and therefore loading it, as the player on instantiation checks the iframe for a valid source and blows up if it doesn't find one. So at the moment I have to initially set a url to a small dummy video to get the player instantiated and then to allow me later to then call loadVideo to load the actual video I want.
The text was updated successfully, but these errors were encountered: