Commit Graph

19 Commits

Author SHA1 Message Date
Stypox 4b1824e8c1
Allow play/pausing from notification when buffering
This change is in line with a recent change in how the play/pause button behaves in the player ui: if the buffering indicator is shown, it's still possible to toggle play/pause, to allow e.g. pausing videos before they even start.
This change was needed because on Android 13+ notification actions can't be null, and thus the buffering hourglass action wasn't shown.
2023-12-29 16:18:26 +01:00
Stypox 17e88f1749
Do not update notification actions if nothing changed
This should avoid costly updates of the media session.
2023-12-29 16:16:45 +01:00
Stypox 5edafca05a
Implement notification actions via MediaSessionConnector on Android 13+ 2023-12-29 15:54:15 +01:00
Stypox 2c4c283099
Extract NotificationActionData from NotificationUtil 2023-12-29 15:54:15 +01:00
Stypox 9fb8125655
Allow each notification slot to contain any possible action 2023-12-29 15:54:15 +01:00
Isira Seneviratne f3b458c803
Bump compileSdk to 34 2023-12-23 11:38:32 +01:00
AudricV 84d50da009
Restore player service start handling before player UI separation
This behavior was present before 0.24.0 and the player UI separation and
avoided crashes for which their exception contained
"Context.startForegroundService() did not then call Service.startForeground()".

Some player nullability checks have been also added, and the player service is
now stopped when it has been started from a media button and there is nothing
to play.
2023-11-15 23:21:20 +01:00
Isira Seneviratne acebabd028 Use AndroidX's PendingIntentCompat class. 2023-04-13 10:53:46 +05:30
Isira Seneviratne 3dc1adb69e Add helper methods for adding PendingIntent mutability. 2022-11-07 17:12:22 +05:30
Stypox ed87465565
Only update notification large icon when it changes 2022-08-28 23:14:02 +02:00
Stypox 973a966011 Review suggestions 2022-08-25 17:02:53 +02:00
Stypox d73ca41cfe Even when thumbnails should not be shown, set it to null in notification
This makes sure the thumbnail is removed from the notification if the user disables thumbnails
2022-08-25 17:02:51 +02:00
Stypox c054ea0737 Create MediaSessionPlayerUi 2022-08-25 17:00:41 +02:00
Isira Seneviratne a9af1dfdd2 Applied code review changes. 2022-08-05 06:54:03 +05:30
Isira Seneviratne fc46233baf Use toArray() with zero-length arrays. 2022-08-05 06:50:55 +05:30
litetex 3ba04f179f Fixed conflicts/build 2022-07-15 20:00:08 +02:00
Stypox 4979f84e41
Solve some Sonarlint warnings 2022-07-13 23:33:16 +02:00
Stypox a19073ec01
Restore checkstyle and solve its errors 2022-07-13 23:32:27 +02:00
Stypox 90a89f8ca5
Move player-notification files into their package 2022-07-13 23:27:24 +02:00