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

Review time problems #75

Merged
merged 1 commit into from
Oct 8, 2012
Merged

Review time problems #75

merged 1 commit into from
Oct 8, 2012

Conversation

Tolia
Copy link
Contributor

@Tolia Tolia commented Mar 21, 2012

@happyworm
Copy link
Contributor

I like this. It solves the missing hours problem in a nice way, by adding it onto the minutes instead.

I think I will be merging this request and then making a few tweaks to it to change the 3 show options as they are could be more useful. We want the time format to be more automatic based on the time being displayed.

We had been thinking of making it automatic so that when the time is greater than an hour, it shows. Likewise for the other time units... So showing only seconds would show the minutes if required... However your solution makes me wonder... As your solution respects the show options and corrects them accordingly. Well, it corrects the minutes display for missing hours. Technically, the same should be true for seconds and minutes.

But how far do we go with the options... In general they are pretty useless and I doubt anyone is really using them atm other than to turn on the hours. And having 3 options for show: hours, mins and secs does mean we should be looking further up as seconds depends on minutes, which depends on hours. Even if only showing hours and seconds would be unusual.

Enough of my waffling... I think I'll go with your solution.

happyworm pushed a commit that referenced this pull request Oct 8, 2012
@happyworm happyworm merged commit 7b30810 into jplayer:master Oct 8, 2012
@happyworm
Copy link
Contributor

After reviewing the code and considering the following:

  1. Backward support.
  2. The convertTime function is used for duration and currentTime.

I decided that the showUNIT options, like showHours, should directly control whether the unit is displayed in the format and it should not depend on there being a value > 0 in it.

This way, the currentTime can be 0:37:42 and duration 1:24:35. ie., So both time formats match.

Using your code it would be: currentTime 37:42 and duration 1:24:35.

While I agree that both have their uses... Or personal preference... Consider the same case for the minutes. I have made the seconds behave in the same way now BTW, 60*min when !showMin. The display would be just the seconds for the first 59 seconds and then the 1:00 appears.

Decided to do it this way mainly so that the format of the currentTime and duration always match.

@thepag
Copy link
Contributor

thepag commented Nov 19, 2014

Hello @Tolia
Would you please sign the CLA

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.

3 participants