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

restarting a video does not reset it to full screen #33

Closed
shiffman opened this issue Nov 17, 2013 · 4 comments
Closed

restarting a video does not reset it to full screen #33

shiffman opened this issue Nov 17, 2013 · 4 comments

Comments

@shiffman
Copy link
Member

I noticed playing around with the color lesson that if I hit "restart" while the code editor is in view, the video begins with that view rather than full screen. I believe a fix should be to add:

           .code({
                start: "0:00",  
                onStart: function () {
                    helloEditor.videoMode = true;
                    helloEditor.resizeUI();

                    $("#editorContainer").hide();
                    $("#canvasContainer").hide();

                    helloEditor.setCode("");
                    helloEditor.resetInstance();                     

                }
            })

to each video that should start full screen, but this didn't work for me. . and maybe @scottgarner you would prefer a different solution?

@scottgarner
Copy link
Collaborator

That's the right idea, but Popcorn is a little weird about events at 0:00, unfortunately. I think it might be cleanest to have a function to set the initial state and call it both from the script's init() and from a reset function.

Let me quickly make that change.

@shiffman
Copy link
Member Author

Got it, I also just noticed that I was making changes running jekyll locally but testing off of hello.processing.org (oops) so it may actually work. But your solution is better anyway. Am currently playing around with script.js seeing how it works and breaking things out so you may notice some changes happening there.

@scottgarner
Copy link
Collaborator

My experience was that events at 0:00 worked in Chrome and Safari, but not Firefox, oddly enough.

I just pushed a new editor.js and script.js with reset() for setting and resetting the initial state. It's only on the third lesson at the moment and will need more work to make sure it's restoring to the proper code, etc., but should work in principle.

scottgarner added a commit that referenced this issue Nov 17, 2013
@scottgarner
Copy link
Collaborator

Added reset() for all of the scripts. They'll need to be customized, but I think that takes care of this bug.

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

2 participants