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

MediaSession 을 이용한 Media Control Player UI #274

Merged
merged 4 commits into from
Dec 6, 2023

Conversation

2taezeat
Copy link
Collaborator

@2taezeat 2taezeat commented Dec 5, 2023

Issue

Overview

  • Player에 대한 기능에서, MainActivity와 PlayerFragment 공통으로 사용하는 로직을 PlayerUtil.kt 파일에 확장함수로 작성하였습니다.

  • MediaMetadata 을 설정해야, Media Control에 제대로 배경과, title 정보가 나타나게 됩니다.

    • android api 33 이전 버전에도 MediaMetadata 설정을 해야 UI가 표시됩니다.

Screenshot

스크린샷은 Android api 33에서 찍었습니다.

스크린샷 2023-12-05 12 20 09 스크린샷 2023-12-05 12 20 16

@2taezeat 2taezeat self-assigned this Dec 5, 2023
@2taezeat 2taezeat linked an issue Dec 5, 2023 that may be closed by this pull request
@2taezeat 2taezeat added this to the 🎶 music player milestone Dec 5, 2023
@2taezeat 2taezeat added ✨ feat 기능 개발 🤖 android android labels Dec 5, 2023
@2taezeat 2taezeat changed the title Android/feature/122 MediaSession 을 이용한 Media Control Player UI Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

Test Results

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

Results for commit a100d11.

♻️ This comment has been updated with latest results.

@@ -0,0 +1,42 @@
package com.ohdodok.catchytape.feature.player
Copy link
Member

Choose a reason for hiding this comment

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

이 파일에서 개행이 모두 2줄로 되어있는데 어떤 특별한 의도가 없다면 개행을 1줄로 하는 것 어떤가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

반영했습니다~

Comment on lines 9 to 23

fun ExoPlayer.moveNextMedia() {
seekToNextMediaItem()
if (isPlaying) {
play()
}
}


fun ExoPlayer.movePreviousMedia() {
seekToPreviousMediaItem()
if (isPlaying) {
play()
}
}
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

@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.

고생하셨습니당~

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.

고생했어용~!

@2taezeat 2taezeat merged commit d7a8ce0 into develop Dec 6, 2023
2 checks passed
@2taezeat 2taezeat deleted the android/feature/122 branch December 6, 2023 01:04
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.

Media Control UI / UX
3 participants