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

goog.ui.media.FlashObject isLoaded fails in IE11 #631

Open
GoogleCodeExporter opened this issue Jul 28, 2015 · 0 comments
Open

goog.ui.media.FlashObject isLoaded fails in IE11 #631

GoogleCodeExporter opened this issue Jul 28, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create and render an instance of a FlashObject in IE11
2. Address issue #630 so that FlashObject renders properly
3. Call isLoaded() on the FlashObject instance

What is the expected output? What do you see instead?
.isLoaded will always return false in IE11.  It should return true once the 
object is loaded.

Please provide any additional information below.
isLoaded contains two different tests to determine whether the FlashObject is 
loaded.  Both fail in IE 11.
    if (this.getFlashElement().readyState &&
        this.getFlashElement().readyState ==
            goog.ui.media.FlashObject.SwfReadyStates_.COMPLETE) {
      return true;
    }
This fails because COMPLETE is defined as Number(4) while readyState in IE 11 
will return "complete" when the flash object is loaded.

    if (this.getFlashElement().PercentLoaded &&
        this.getFlashElement().PercentLoaded() == 100) {
      return true;
    }
This fails because testing for the existence of the PercentLoaded function 
returns false, even though actually calling it will return successfully.


Changing the first test to the following appears to work although it results in 
a type mismatch warning from the compiler.
    switch (this.getFlashElement().readyState) {
      case goog.ui.media.FlashObject.SwfReadyStates_.COMPLETE:
      case 'complete':
        return true;
    }

Original issue reported on code.google.com by andrew.c...@period7.com on 19 Mar 2014 at 9:11

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