-
Notifications
You must be signed in to change notification settings - Fork 74
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
Error: preload method not defined. #30
Comments
@daveferrara1 Thank you for the report. We'd like to get a little more information about the issue, if we could. As part of our code review process, we try to make sure that we understand the issue as best we can so that we can verify that a PR fully addresses it. For example:
etc. The best way to answer these questions and to clarify an issue is to provide a minimal, complete, verifiable example. Would you be able to create one for this issue? Here's a codepen to get you started (note that it uses VideoJS 7.3.0 and videojs-chromecast 1.1.0). This also gives us a good start toward testing a fix. Side note: I can see from this comment on the PR you submitted that it's likely that something is calling the Thanks! |
Had a look at your code pen. That has a console error. I noticed the chromecast button is missing but still in the dom but it has vjs-hidden class so likely its missing because its problematic in that sandboxed iframe. So that pen does not cast. Maybe it used to, or your just casting the browser window (that works), and not the player in the MCVE. Maybe its a paid feature? You got it right on -- mux is looking for the preload method. Would have to assume they think its common. We are using: |
@daveferrara1 Sorry, I should have specified: when using the Codepen, you have to cast from the "debug" view (https://s.codepen.io/mluedke/debug/MzKmKq/xJAjOqwNbEnk) because the preview in the editor view is embedded in a sandboxed iframe, which causes the error you noted. The "debug" view is not enclosed in an iframe. I tend to do all of my testing in the "debug" view. Please give that a try and let me know if you have any other issues creating the MCVE. |
A note for our reference: The We should prevent throwing an error, either by implementing the Of course, doing that doesn't guarantee that it fixes the issue with MUX if MUX is relying on |
This is only semi related but I can't get the chromecast tech to work in a simple example with preload I have a full on react app that is no longer seeming to load anything from the cast_sender script I'm wondering if that is happening here. |
@AndrewStobie it's not clear at all why you think the problem with your CodePen is related to this issue. If it is related to this issue, please clarify your reasoning. Also, please open your console and look at the errors that it's reporting. The first thing I saw when trying to open your CodePen was that there's a 404 because you have an invalid URL to the ChromeCast plugin JS file. There may be other issues - I'm not sure - but looking at the console should get you on the right track. |
Hi folks! I wanted to resurface this issue here as I have run into the same problem. Essentially, if any plugin attempts to call
@daveferrara1 has created a PR #31 that uses @yokuze's suggestion of a noop and I have confirmed that this in fact prevents the errors from being spewed in the console. I have also confirmed that in this case, the Mux plugin is handling the errors gracefully, but videojs is still logging them to the console. So there aren't any major issues there. Wondering if we can please merge in #31? |
Sorry this took so long. Thanks @daveferrara1! I just published v1.2.2 |
Using MUX we found that calls to the tech method preload were not satisfied one we begin casting.
The text was updated successfully, but these errors were encountered: