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

Preview selected frame #90

Merged
merged 15 commits into from
Dec 9, 2015
Merged

Preview selected frame #90

merged 15 commits into from
Dec 9, 2015

Conversation

le717
Copy link
Contributor

@le717 le717 commented Dec 4, 2015

Fixes #47 (including playback) and the remaining items in #48. Allows #83 to be implemented.

Notes

  • When playing from a frame, if loop is enabled it will start back from the beginning.

@le717
Copy link
Contributor Author

le717 commented Dec 5, 2015

Alright, bug is fixed. Ready for review. :)

});

// Preview a captured frame
document.querySelector("#reel-captured-imgs").addEventListener("click", function(e) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is a querySelector used here rather than the frameReelRow variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I did not know that variable existed and I didn't Ctrl+f the selector. Will fix.

@charlielee
Copy link
Owner

@le717 this looks good! 😄 I've added a couple of notes related to code style.

In terms of functionality you mention When playing from a frame, if loop is enabled it will start back from the beginning.. I'm not sure if this is a bug or intentional behaviour but I feel it is a bit unintuitive and should be changed.

I've found a similar issue when looping isn't enabled after playing from a frame and playback stopping at the last frame. If "play" is pressed again at this point playback starts from the first frame in the frame reel rather than the previously selected frame.

Another improvement I'd suggest is that when "stop" is pressed the white frame outline should move to the last frame in the frame reel.

Also on a side note when playback is in progress there should be some sort of visual cue in the timeline, such as a vertical line that moves along with each frame displayed. Although I appreciate this point is beyond the scope of this particular pull request so don't worry about it for now!

@@ -54,7 +54,7 @@ var width = 640,
// Status bar
statusBarCurMode = document.querySelector("#currentMode span"),
statusBarCurFrame = document.querySelector("#currentFrame span"),
statusBarFrameNum = document.querySelector("#noOfFrames"),
statusBarFrameNum = document.querySelector("#num-of-frames span"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#num-of-frames span is an id that is in lower case with hyphens and doesn't match the style of the other ids used in the status bar. Would you recommend the the other ids in the status bar are changed to match this format?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it does not have happen now unless you want me to do it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah no need to do this for now

@le717
Copy link
Contributor Author

le717 commented Dec 8, 2015

Another improvement I'd suggest is that when "stop" is pressed the white frame outline should move to the last frame in the frame reel.

I tried this out. It was... technically interesting. However, I not sure it would be appropriate. First off, the outline does not move to each active frame during playback (your suggestion), so having it suddenly appear at stop would be odd. It also introduced a number of new cases where it'd need to be removed. I'll keep playing with it.

In terms of functionality you mention "When playing from a frame, if loop is enabled it will start back from the beginning.." I'm not sure if this is a bug or intentional behaviour but I feel it is a bit unintuitive and should be changed.

I've found a similar issue when looping isn't enabled after playing from a frame and playback stopping at the last frame. If "play" is pressed again at this point playback starts from the first frame in the frame reel rather than the previously selected frame.

This was by design. There is no "previously played" state (and I don't think it'd be as simple as setting a true/false either). The frame preview is just that- a preview. It is only meant to temporarily alter the playback. If it were persistent, how would you reset it back to frame 1? A button in the UI? Maybe but could be confusing. Scroll back to frame 1, click it, then scroll back to the end and click the live view button? That is not acceptable. That's why I made it restart from the beginning.

That being said, I can still look into it if you would like.

@charlielee
Copy link
Owner

I see what your saying. There isn't an issue with what you've implemented at all, my previous suggestion would in fact make things far more confusing.

What I'm really trying to work out is how to handle repeated playback not from the beginning. I think I've figured out how it could work based on the notation program Sibelius. I'll explain this in more detail tomorrow.

Caleb Ely added 4 commits December 8, 2015 19:12
I did not realize it broke the stop button.
+ Add some missing strict directives
- Remove unneeded call to _getDefaultDirectory()
simplify confused live view button styling
@le717
Copy link
Contributor Author

le717 commented Dec 9, 2015

Loop region playback would be something to explore but it is a tricky thing to handle (and should not be a current focus).

BTW, this PR is done. The sooner you merge it, the sooner I can remove all those pesky delete buttons. ;)

@le717 le717 mentioned this pull request Dec 9, 2015
5 tasks
@charlielee
Copy link
Owner

I've rechecked out your branch and I'm happy with how it works now and will therefore merge it.

I'd like to take back what I said a couple of days about the playback reseting being "uninitiative". After thinking about it today I'm not sure why I saw a problem with it!

charlielee pushed a commit that referenced this pull request Dec 9, 2015
Preview selected frame (thanks @le717)
@charlielee charlielee merged commit c923cc5 into charlielee:master Dec 9, 2015
@le717 le717 deleted the issue-47 branch December 9, 2015 00:50
@le717
Copy link
Contributor Author

le717 commented Dec 9, 2015

Hey, no need to take it back. it wasn't offensive or anything. It's called discussion and is a part of review. You brought up a path I had considered but did not go with. Since it's my PR, it was my burden of proof to explain how the implemented way was, even for the time being, better. It's all good, don't worry about it. :)

@le717 le717 added this to the v0.6.x milestone Mar 2, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants