-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Feat: Add video loop options #653
base: main
Are you sure you want to change the base?
Feat: Add video loop options #653
Conversation
Minor thing, but in my opinion it would've looked a lot better if the icon wasn't fill color, in the video it outstands from the others... |
yeah i was thinking the same but the problem was there was no separate icon availble in vector assets for LoopOff button, so i just changed the color, now i have replace that icon with a different one... tell me how it looks now sample9.mp4 |
Good job. It looks better now. |
Hey @Yashraj254, What i'm thinking will be good is loop options like "loop one video", "loop all videos", "loop off". |
@anilbeesetti alright.. working on it |
VideoLoop.LOOP_ALL -> { | ||
player.repeatMode = Player.REPEAT_MODE_OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VideoLoop.LOOP_ALL -> { | |
player.repeatMode = Player.REPEAT_MODE_OFF | |
VideoLoop.LOOP_ALL -> { | |
player.repeatMode = Player.REPEAT_MODE_ALL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we try using it here, Player.REPEAT_MODE_ALL will keep playing the same video infinitely; it acts the same as Player.REPEAT_MODE_ONE because, if you try to print the player's mediaItemCount, it returns 1, which is the currently playing media item.
In the playVideo() method, this line specifies that only one media item is added in the player's mediaItems list and not the whole playlist.
player.setMediaItem(mediaStream, viewModel.currentPlaybackPosition ?: C.TIME_UNSET)
Player.REPEAT_MODE_ALL would have worked if player.setMediaItems(mediaStreamList)
would have been used instead of player.setMediaItem(mediaStream)
, i.e. , adding the entire playlist at once and not clearing up the player's mediaItems list and then adding a single mediaItem every time playVideo() is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it
# Conflicts: # feature/player/src/main/java/dev/anilbeesetti/nextplayer/feature/player/PlayerActivity.kt # feature/player/src/main/res/layout/exo_player_control_view.xml
hey @anilbeesetti conflicts resolved. Ready for merge. Any further changes or feedback? |
@anilbeesetti Are you still around ? |
Hey @drogga, I'm here. Thanks for checking in. I've been caught up with my new job and other stuff for the last two months. I'll be more engaged starting next month. |
# Conflicts: # core/model/src/main/java/dev/anilbeesetti/nextplayer/core/model/PlayerPreferences.kt # feature/player/src/main/res/layout/exo_player_control_view.xml
Can we please get this merged? this basic feature is all that is stopping myself and i am sure many others from using this player right now. |
mpv-android and just (video) player has this feature. |
Is there an issue with merging this request? I would really like to switch to this player. I am considering just forking it and manually copying the pull request and compiling an apk at this point. If there is an actual merge issue maybe i can help? |
Hey, I will try to merge this for the upcoming release |
Fix #572 added a functionality to play videos in loop
sample8.mp4