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

ChaptersView plugin failing to render properly #414

Open
Tape opened this issue May 2, 2013 · 4 comments
Open

ChaptersView plugin failing to render properly #414

Tape opened this issue May 2, 2013 · 4 comments

Comments

@Tape
Copy link

Tape commented May 2, 2013

See #398, I had submitted this before and it seems related.

Basically every now and then the ChaptersView plugin will load, but more than likely it fails to do so. I found that this section of code is the culprit. I commented the critical lines to indicate their values and results.

checkMediaReady:function( callback ){
    if( this.getAttr( 'playerStatusProxy.kdpStatus' ) == 'ready' // true
        && 
        this.getAttr( 'mediaProxy.entry.width' ) // null, however when the video is queried later I get a number.
    ){
        callback();
    } else {
        this.kdp.kBind('mediaReady', callback ); // Never actually runs?
    }
}

I'm a bit puzzled because one of our plugins actually seems to work fine using purely the mediaReady binding and loads just fine every time and has no issue using mediaProxy.entry.width. Any ideas as to what could be causing this?

Also, I checked the loadCuePoints with a breakpoint and I can see that all of them are being loaded and drawChapters is never being called.

@Tape
Copy link
Author

Tape commented May 3, 2013

I am not sure at all why this works any differently but it works every time now with the changes I have made. It seems as though playerStatusProxy.kdpStatus is very unreliable because the width returns null every time that condition is true. I dropped those checks, moved the mediaReady event check to when the plugin is initialized (so it will always go off), and it now works every time.

See this commit for the changes mentioned: catturavideo@8c06a35

@mdale
Copy link

mdale commented May 3, 2013

The reason we try and do it how its implemented now is so we don't have to wait for full mediaReady to request the cuePoints ... but if we are still running into issues with the flash player as you outline, I agree it would be better to just wait for mediaReady all the time.

I will merged your change into a chaptersUpdate branch, we will make some other minor enhancements there for the editor and then merge this into the main repo.

@Tape
Copy link
Author

Tape commented May 3, 2013

The cuePoints are still being loaded asynchronously, I made sure of that. The change I proposed will ensure that the mediaReady event actually does fire, which seems to be the most reliable event (at least for the flash fallback player).

@mdale
Copy link

mdale commented May 3, 2013

Your right. I am looking at the change closely, it retains the async chapters loading support. great :)

@mdale mdale mentioned this issue May 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants