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

이전, 다음 곡 이동 로직 개선 #307

Merged
merged 3 commits into from
Dec 7, 2023
Merged

Conversation

2taezeat
Copy link
Collaborator

@2taezeat 2taezeat commented Dec 7, 2023

Issue

Overview

  • EVENT_MEDIA_ITEM_TRANSITION : 자동으로 시간이 흘러서 다음 곡으로 넘어갈 때 발생하는 이벤트

  • EVENT_TRACKS_CHANGED : 곡 이동 버튼 클릭시 발생 이벤트 (이전 곡, 다음 곡 모두 발생)

  • 현재 곡 진행 길이(positon) / 전체 곡 길이(duration)

    • 0.05 보다 작으면, 이전 곡으로 이동
    • 크면, 현재 곡의 처음(Head) 로 이동
    • 0.05 상수 값은 상식 선에서 임의로 정했습니다.

Screenshot

@2taezeat 2taezeat added ✨ feat 기능 개발 🤖 android android labels Dec 7, 2023
@2taezeat 2taezeat added this to the 🎶 music player milestone Dec 7, 2023
@2taezeat 2taezeat self-assigned this Dec 7, 2023
@2taezeat 2taezeat linked an issue Dec 7, 2023 that may be closed by this pull request
@2taezeat 2taezeat changed the title Android/feature/273 이전, 다음 곡 이동 로직 개선 Dec 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

Test Results

6 tests   6 ✔️  1s ⏱️
2 suites  0 💤
2 files    0

Results for commit 2ff31c3.

Comment on lines +16 to +21
events.contains(Player.EVENT_MEDIA_ITEM_TRANSITION) -> {
val durationMs = player.duration.toInt()
listener.onMediaItemChanged(player.currentMediaItemIndex, durationMs / millisecondsPerSecond)
}

events.contains(Player.EVENT_TRACKS_CHANGED) -> {
Copy link
Member

Choose a reason for hiding this comment

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

오 이벤트 찾아주셔서 감사합니다 👍🏻

Copy link
Member

@HamBP HamBP left a comment

Choose a reason for hiding this comment

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

고생했어용~!!

Copy link
Member

@youlalala youlalala left a comment

Choose a reason for hiding this comment

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

고생하셨어용!!

@2taezeat 2taezeat merged commit e548b62 into develop Dec 7, 2023
2 checks passed
@2taezeat 2taezeat deleted the android/feature/273 branch December 7, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android android ✨ feat 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

이전 곡 로직 개선
3 participants