-
Notifications
You must be signed in to change notification settings - Fork 29
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 if Flash tech is unusable #50
Conversation
@@ -61,6 +61,13 @@ const initPlugin = function(player, options) { | |||
const resetMonitor = function() { | |||
window.clearTimeout(monitor); | |||
monitor = window.setTimeout(function() { | |||
// if using Flash then make sure its API is available | |||
if (/swf/i.test(player.tech_.el().data) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get at this without using tech_
? That's supposed to be a private property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to use player.$()
instead
let tech = player.$('.vjs-tech'); | ||
|
||
// don't error if using Flash and its API is available | ||
if (tech && tech.type === 'application/x-shockwave-flash' && tech.vjs_getProperty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be && !tech.vjs_getProperty
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are correct
I think something's still wrong with this, here's the scenario: |
} | ||
|
||
// playback isn't expected if the player is paused, shut | ||
// down monitoring |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is somewhat inaccurate. Technically, you're saying "keep checking, it looks like everything is fine right now".
* Error if Flash tech is unusable * Return early if there already is an error * Added clarifying comments
No description provided.