yoheimuta / RxMusicPlayer

A reactive library to make it easy for audio playbacks using RxSwift.
MIT License
58 stars 8 forks source link

Time format considering the hour notation like "%H:%M:%S" instead of "%M:%S" #45

Closed rastaman111 closed 2 years ago

rastaman111 commented 2 years ago

@yoheimuta I noticed a hundred if the length is more than one hour, then the time is displayed incorrectly

image

rastaman111 commented 2 years ago

image

rastaman111 commented 2 years ago

Hi @yoheimuta. When can you update this issue and #43

rastaman111 commented 2 years ago

Hey @yoheimuta! How soon will you make this change?

rastaman111 commented 2 years ago

public var displayTime: String? { guard let sec = seconds?.rounded().toInt() else { return nil } return String(format: "%d:%02d", sec / 60, sec % 60) }

convert:

Снимок экрана 2021-11-30 в 17 01 54
yoheimuta commented 2 years ago

@rastaman111 I changed the title. Is it more correct? Title accuracy influences my attention.

I'm willing to support this use case. Before the support, you have a workaround to edit "displayTime" yourself.

rastaman111 commented 2 years ago

I implemented this solution as in the screenshot, since it works correctly, it shows the Clock index when needed

yoheimuta commented 2 years ago

@rastaman111 The screenshot doesn't tell me the desired result. It's a source code.

Can you fill in words below?

rastaman111 commented 2 years ago

I installed the player via Pod and changed your function to the one on the screen and it works as it should

image image image