100 Commits
Author SHA1 Message Date
Maxr1998 aa2172880a Use DefaultMediaSourceFactory instead of manually picking factories
This fixes external subtitles not working anymore due to the deprecation of SingleSampleMediaSource, and greatly simplifies the QueueManager code.
2026-06-20 17:35:59 +02:00
Maxr1998 6be3652bdc Fix external subtitle selection
A recent (?) AndroidX Media3 update caused MergingMediaPeriod to prepend the period ID to the track format's id, breaking the actual track selection. Only matching the substring fixes selecting external subtitles.
2026-06-20 17:01:53 +02:00
Max Rumpf 146db28af5 Migrate downloads UI to Compose (#1948) 2026-04-20 22:16:19 +02:00
Max Rumpf 79c8e70847 Load media session artwork from content provider (#1558) 2025-03-18 11:24:07 +01:00
Maxr1998 47f927fc83 Initialize playerFullscreenHelper earlier to prevent crash in onDestroy 2025-03-17 07:16:27 +01:00
Maxr1998 26e60cde65 Use extension and fix possible crash
width and height can be null, MediaStream.isLandscape handles this.
2025-03-17 07:16:27 +01:00
Maxr1998 341676279e Enable edgeToEdge and properly handle insets in exo player 2025-03-17 07:16:27 +01:00
Maxr1998 8e8946e834 Fix margins not always being applied 2025-03-17 07:16:27 +01:00
Maxr1998 be9f01cba1 Compile against SDK 35 (Android 15) 2025-01-26 17:22:26 +01:00
Maxr1998 06ffdfe1cb Fix/suppress detekt warnings 2025-01-26 02:05:09 +01:00
Maxr1998 a78cd97f3a Tweak download location preference handling 2024-04-23 16:03:23 +02:00
Maxr1998 7d153da96d Update dependency de.maxr1998:modernandroidpreferences to v2.4.0-beta2 2024-04-07 21:19:01 +02:00
Maxr1998 d26adfc4af 🚨 Remove unused import 2023-12-24 12:34:43 +01:00
Maxr1998 d8bbe0be2c 🐛 Fix External Player missing external subtitles
To get external subtitle streams, we have to provide a device profile when resolving the media source.
2023-12-24 12:34:43 +01:00
Maxr1998 56dab17394 Cleanup code and fix warnings 2023-09-05 13:27:51 +02:00
Maxr1998 d44021397c Request bluetooth permission to pause on device disconnect
Since Android S, a new permission is required to be able to receive the relevant broadcast events.
2023-09-05 13:27:51 +02:00
Maxr1998 af9f2be116 Prevent keyboard (dis)connection from restarting the app 2023-09-05 12:25:03 +02:00
Maxr1998 6388e77fdd Address review feedback 2023-09-03 09:45:04 +02:00
Maxr1998 819ca4723a Ensure ExternalPlayer always direct plays
Remove now unnecessary device profile, and set high bitrate limit so that we never exceed it.
2023-09-03 09:45:04 +02:00
Maxr1998 8a1c83b0f6 Remove PlayOptions.maxBitrate which is always null 2023-09-03 09:45:04 +02:00
Maxr1998 ca54f9fc38 Refactor ExternalPlayer.notifyEvent 2023-09-03 09:45:04 +02:00
Max Rumpf 322201e2ea Fix integrated player crashing on Android 14 (#1180) 2023-09-03 09:44:00 +02:00
Maxr1998 bb22febe64 Remove unnecessary defaults from device profiles 2023-09-02 11:05:13 +02:00
Maxr1998 fecd370a25 Fix app returning to WebViewFragment when activity restarts
`repeatOnLifecycle(Lifecycle.State.STARTED)` caused the flow collection to be restarted after the activity was stopped and then started again (for example, when opening another activity on top and then going back).
However, this triggered `handleServerState` with the current state again, which unintentionally replaced the current fragment (for example the player or settings) with the WebViewFragment.
The solution is to permanently collect the latest server state, but delay its application to the lifecycle start of the activity.
2023-08-25 20:17:30 +02:00
Maxr1998 19ea3587b4 Remove RedScreenOfDeath 2023-08-21 22:33:42 +02:00
Maxr1998 85c54fe6c8 Fix deprecation and extract method 2023-08-20 12:44:21 +02:00
Maxr1998 ca3513f7a3 Update compile and target SDK to 34 2023-08-19 23:39:22 +02:00
Max Rumpf c1d0561704 Pre-fill last hostname and add history to suggestions in connect screen (#1134) 2023-08-17 22:34:45 +02:00
Maxr1998 56b6c05a50 Remove dependency updates plugin
Not necessary anymore after exclusively using renovate.
2023-06-11 19:24:55 +02:00
Max Rumpf 38231bec7d Fix VLC external player crashing on Android 13 (#1103)
Due to security-related changes in Android 13, the entrypoint must be the default start activity.
2023-06-10 21:35:09 +02:00
Maxr1998 49b821ea4e Disable ExoPlayer and External player while in SyncPlay 2023-05-22 21:29:30 +02:00
Maxr1998 8bfd1469dd Fix milestone property always being undefined and thus non-null 2023-05-22 21:29:11 +02:00
Maxr1998 17b37fcad1 Fix insets handling on Android 10 and below 2023-05-17 08:45:37 +02:00
Maxr1998 dff63a3fb8 Add documentation to version helpers 2023-05-16 22:36:49 +02:00
Maxr1998 2fdc30fadc Use helper class for Android version checks 2023-05-16 22:36:49 +02:00
Maxr1998 d18c59779a Don't overwrite milestone if applied already 2023-05-16 22:34:59 +02:00
Maxr1998 cfc6c7ff6c Only play fullscreen video in ExoPlayer
This resolves a problem where non-fullscreen media like theme videos would be played in ExoPlayer, instead of playing as a backdrop in the web interface.
2023-05-16 19:05:37 +02:00
Maxr1998 8b6e2aefe9 Add pgssub to ExoPlayer subtitle codecs
ExoPlayer supports decoding embedded pgssub subtitles, so they should be enabled.
2023-05-13 20:51:10 +02:00
Maxr1998 cf521448c0 Fix player menu track selection
Because the menus use setGroupCheckable with exclusive=true, it isn't necessary to uncheck the other items.
Furthermore, while transcoding, the media source is updated and the menu rebuilt (with the new selections already). This causes the clickedItem to become outdated/invalid in the fragment.onXTrackSelected callback. As a result, the selection will be invalidated.
To fix this, we assume that selections are always successful and immediately apply the selection to the clicked item before notifying the fragment.
2023-05-13 20:49:34 +02:00
Maxr1998 6359d8b7e5 Fix audio track selection for >= 10 tracks 2023-05-05 18:39:50 +02:00
Maxr1998 381d9f36c7 Rewrite queue management and play options handling
Caching media sources in the queue was unnecessary and overly complex, and could cause issues if playback options changed in between (i.e. a new bitrate). Additionally, there was some duplication between the cached play options and the current media source, which caused more confusion and issues.
2023-05-05 16:29:38 +02:00
Maxr1998 79b75882ec Cleanup player notification handling 2023-05-05 14:07:31 +02:00
Maxr1998 e84c4bb5a0 Fix notification deletion not stopping playback 2023-05-05 14:07:31 +02:00
Maxr1998 6547b727fe Fix audio track selection if multiple renderers are used
When ExoPlayer has to use multiple different renderers, the order of mapped track groups returned by the player may not conform to the order of media streams in the media source.
Unfortunately, ExoPlayer doesn't allow accessing the original TrackGroups that are kept in the MediaPeriod, thus we instead simply sort the available groups by the format id.
2023-04-28 20:56:47 +02:00
Maxr1998 cf576b9345 Disable line breaks after multiline when entries 2023-04-28 20:56:38 +02:00
Maxr1998 240ee591ef Fix subtitle selection for encoded subtitles 2023-04-14 19:27:10 +02:00
Maxr1998 6864d141e1 Disable Jetifier
We don't have any dependencies requiring it anymore, so it can be disabled.
2023-04-05 19:54:55 +02:00
Maxr1998 2f57f91dc3 Rework track handling and selection
Add proper support for external audio streams, rework audio and subtitle selection, and support extracted subtitles during transcoding playback.

Also extracts some code to a new TrackSelectionHelper class.
2023-04-04 17:16:34 +02:00
Maxr1998 565d361c24 Fix items not getting checked in bitrate selection popup 2022-12-31 10:59:55 +01:00
Maxr1998 cea6224153 Rework fullscreen/insets handling and fix deprecations 2022-12-28 14:01:13 +01:00
Maxr1998 a0ea262a10 Improve media source id handling 2022-12-27 18:30:01 +01:00
Maxr1998 ba88249c9b Fix and rewrite audio and subtitle track selection when transcoding 2022-12-27 18:30:01 +01:00
Maxr1998 709bfc3f5f Change "cancel loading" button to "use a different server" 2022-12-24 22:14:56 +01:00
Maxr1998 d36316d14e Add button to cancel loading before timeout 2022-12-24 22:14:56 +01:00
Maxr1998 b1b9628508 Run detekt and lint in parallel 2022-12-24 14:04:10 +01:00
Maxr1998 661b484121 Don't ignore detekt failures anymore 2022-12-24 14:04:10 +01:00
Maxr1998 9ed5138714 Fix various detekt warnings 2022-12-21 08:21:23 +01:00
Max Rumpf 1ffce9e293 Add link to Android subtitle settings in client settings (#905)
* Add link to Android subtitle settings in client settings

* Only show subtitle settings link if Intent is available
2022-11-28 09:44:35 +01:00
Maxr1998 f41b12ca20 Detekt auto-fixes (and some manual tweaks) 2022-11-26 00:47:03 +01:00
Maxr1998 91733291a1 Remove unused property 2022-11-26 00:47:03 +01:00
Maxr1998 f611a11d94 Use constant for Magic Number 2022-11-26 00:47:03 +01:00
Maxr1998 b8cfa7ea52 Replace deprecated detekt rules 2022-11-26 00:47:03 +01:00
Maxr1998 31ff5e5359 Address review feedback 2022-10-31 20:45:13 +01:00
Maxr1998 ffebfd9ddf Auto-apply milestones 2022-10-31 20:45:13 +01:00
Maxr1998 1e2840b76d Pin GitHub actions to specific version tag 2022-10-26 22:14:21 +02:00
Maxr1998 c8107587f9 Reformat code 2022-10-26 21:33:41 +02:00
Maxr1998 c5abe67751 Tweak .editorconfig 2022-10-26 21:33:41 +02:00
Maxr1998 d0e28ef49a Set namespace in build.gradle.kts instead of Manifest 2022-10-26 21:32:17 +02:00
Maxr1998 b4a4d359d0 Simplify PlayerFragment transaction 2022-09-24 16:34:30 +02:00
Maxr1998 d9d41db7b1 Decouple NativePlayer from WebViewFragment 2022-09-24 16:34:30 +02:00
Maxr1998 cbd2bfd27e Decouple NativeInterface from WebViewFragment 2022-09-24 16:34:30 +02:00
Maxr1998 6cbf0edf84 Implement bitrate selection 2022-09-24 15:36:43 +02:00
Maxr1998 f5f42601f4 Port quality options from Jellyfin Web 2022-09-24 15:36:43 +02:00
Maxr1998 480c1e9b2b Inject DeviceProfileBuilder instead of DeviceProfile itself
Consumers of the device profile can create and cache it themselves
2022-09-24 15:36:43 +02:00
Maxr1998 807fed61cf DeviceProfileBuilder: load codecs on instance creation and cache them 2022-09-24 15:36:43 +02:00
Maxr1998 b7252abd3b Extract some WebView logic to separate files 2022-09-23 22:30:32 +02:00
Maxr1998 1e87ddd03a Fix deprecation 2022-09-23 22:30:32 +02:00
Maxr1998 6a8858fe9d Raise compileSdk to 33 2022-09-22 12:32:28 +02:00
Maxr1998 6b9bb09f7c Rewrite connection screen in Jetpack Compose 2022-09-21 22:10:27 +02:00
Maxr1998 892a61fe2f Switch to embedded cronet provider 2022-09-20 13:40:43 +02:00
Maxr1998 380434fb2e Enable gesture exclusions for both top and bottom of screen 2022-09-20 12:50:13 +02:00
Maxr1998 7fa8e955f5 Disable ExoPlayer platform diagnostics 2022-09-20 12:50:13 +02:00
Maxr1998 26955ac928 Fix some warnings 2022-09-20 12:50:13 +02:00
Maxr1998 872911d869 Update .editorconfig and fix formatting for renovate.json 2022-04-30 16:02:20 +02:00
Maxr1998 e7c9b38a0c Enable and apply trailing commas from detekt 1.20 2022-04-30 12:32:27 +02:00
Maxr1998 d2241bde57 Enable autocorrect for detekt issues 2022-04-30 12:32:27 +02:00
Maxr1998 2a08c82bcc Fix issues reported by detekt 2022-04-06 14:35:07 +02:00
Maxr1998 6c5a90218d Add detekt formatting plugin 2022-04-06 14:35:07 +02:00
Maxr1998 9bc47dcbd8 Fix cast broken due to invalid manifest entry 2022-04-02 11:20:11 +02:00
Maxr1998 4f0e651a83 Fix or suppress various lint warnings 2022-03-28 22:23:01 +02:00
Maxr1998 21667ea05f Update testing libraries 2022-03-28 22:23:01 +02:00
Maxr1998 c97458c883 Update AndroidX libraries 2022-03-28 22:23:01 +02:00
Maxr1998 c64a68d016 Update Gradle plugins 2022-03-28 22:23:01 +02:00
Maxr1998 1aff3e2e4a Move database schema files to new location 2022-03-28 20:52:54 +02:00
Maxr1998 36eb1d3c9d Remove opt-in for version catalogs
Version catalogs are now stable
2022-02-09 17:31:40 +01:00
Maxr1998 1fe181baa0 Sort playlists by name and return more by default 2022-01-29 10:25:20 +01:00
Maxr1998 615555f9ab Move unlock button to the right to prevent overlap 2022-01-24 21:00:19 +01:00
Maxr1998 33a2d85595 Refactor application packages 2022-01-24 20:28:20 +01:00
Maxr1998 ade07dbb62 Fix some warnings 2022-01-24 08:59:36 +01:00
Maxr1998 b53ac2ce39 Update kotlinx.coroutines 2022-01-24 08:59:36 +01:00