react-native-audio-browser 0.2.0-next.2 → 0.2.0-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -21
- package/android/build.gradle +35 -12
- package/android/gradle.properties +2 -2
- package/android/src/main/AndroidManifest.xml +3 -1
- package/android/src/main/java/com/audiobrowser/AudioBrowser.kt +389 -164
- package/android/src/main/java/com/audiobrowser/AudioBrowserLifecycleModule.kt +38 -0
- package/android/src/main/java/com/audiobrowser/AudioBrowserPackage.kt +18 -2
- package/android/src/main/java/com/audiobrowser/ServiceBinding.kt +48 -0
- package/android/src/main/java/com/audiobrowser/browser/BrowserManager.kt +315 -213
- package/android/src/main/java/com/audiobrowser/browser/BrowserUrlResolution.kt +24 -5
- package/android/src/main/java/com/audiobrowser/browser/InertStyleDiagnostic.kt +267 -0
- package/android/src/main/java/com/audiobrowser/browser/JsonModels.kt +97 -58
- package/android/src/main/java/com/audiobrowser/browser/SectionScope.kt +70 -29
- package/android/src/main/java/com/audiobrowser/browser/StyleResolver.kt +60 -0
- package/android/src/main/java/com/audiobrowser/extension/ResolvedTrackExt.kt +20 -7
- package/android/src/main/java/com/audiobrowser/extension/TappedTrack.kt +20 -0
- package/android/src/main/java/com/audiobrowser/extension/TrackIdentity.kt +15 -0
- package/android/src/main/java/com/audiobrowser/http/HttpClient.kt +20 -3
- package/android/src/main/java/com/audiobrowser/model/IcyTitle.kt +24 -0
- package/android/src/main/java/com/audiobrowser/model/PlaybackMetadata.kt +10 -6
- package/android/src/main/java/com/audiobrowser/model/PlayerUpdateOptions.kt +12 -12
- package/android/src/main/java/com/audiobrowser/player/CapabilityControls.kt +111 -58
- package/android/src/main/java/com/audiobrowser/player/CrossOriginHeaderStripper.kt +77 -0
- package/android/src/main/java/com/audiobrowser/player/MediaFactory.kt +28 -10
- package/android/src/main/java/com/audiobrowser/player/MediaSessionCallback.kt +509 -230
- package/android/src/main/java/com/audiobrowser/player/MediaSessionCommandManager.kt +218 -252
- package/android/src/main/java/com/audiobrowser/player/NowPlayingUpdater.kt +21 -25
- package/android/src/main/java/com/audiobrowser/player/PlaybackStateStore.kt +113 -78
- package/android/src/main/java/com/audiobrowser/player/Player.kt +81 -38
- package/android/src/main/java/com/audiobrowser/player/PlayerCapabilitiesExt.kt +2 -15
- package/android/src/main/java/com/audiobrowser/player/PlayerListener.kt +1 -1
- package/android/src/main/java/com/audiobrowser/player/RetryLoadErrorHandlingPolicy.kt +2 -1
- package/android/src/main/java/com/audiobrowser/player/ShuffleOrderLedBy.kt +30 -0
- package/android/src/main/java/com/audiobrowser/tls/AiaCertChaser.kt +67 -11
- package/android/src/main/java/com/audiobrowser/tls/AiaChasingExtendedTrustManager.kt +168 -0
- package/android/src/main/java/com/audiobrowser/tls/AiaChasingTrustManager.kt +58 -14
- package/android/src/main/java/com/audiobrowser/tls/AiaTls.kt +35 -7
- package/android/src/main/java/com/audiobrowser/tls/CachingCertificateFetcher.kt +278 -59
- package/android/src/main/java/com/audiobrowser/util/ArtworkVariant.kt +7 -9
- package/android/src/main/java/com/audiobrowser/util/BrowserPathHelper.kt +56 -40
- package/android/src/main/java/com/audiobrowser/util/MediaExtrasBuilder.kt +28 -23
- package/android/src/main/java/com/audiobrowser/util/StyleWire.kt +108 -0
- package/android/src/main/java/com/audiobrowser/util/TrackFactory.kt +56 -52
- package/android/src/main/res/values/strings.xml +25 -5
- package/android/src/test/java/com/audiobrowser/ServiceBindingTest.kt +87 -0
- package/android/src/test/java/com/audiobrowser/TestFixtures.kt +119 -33
- package/android/src/test/java/com/audiobrowser/browser/BrowserManagerFavoritesTest.kt +153 -0
- package/android/src/test/java/com/audiobrowser/browser/BrowserManagerLayerResolutionTest.kt +15 -0
- package/android/src/test/java/com/audiobrowser/browser/BrowserManagerTest.kt +346 -8
- package/android/src/test/java/com/audiobrowser/browser/BrowserUrlResolutionTest.kt +38 -0
- package/android/src/test/java/com/audiobrowser/browser/InertStyleDiagnosticTest.kt +277 -0
- package/android/src/test/java/com/audiobrowser/browser/JsonArtworkTest.kt +3 -2
- package/android/src/test/java/com/audiobrowser/browser/JsonStyleTest.kt +147 -0
- package/android/src/test/java/com/audiobrowser/browser/SectionScopeTest.kt +128 -55
- package/android/src/test/java/com/audiobrowser/browser/StyleResolverTest.kt +154 -0
- package/android/src/test/java/com/audiobrowser/extension/TappedTrackTest.kt +43 -0
- package/android/src/test/java/com/audiobrowser/extension/TrackIdentityTest.kt +41 -0
- package/android/src/test/java/com/audiobrowser/model/IcyTitleTest.kt +49 -0
- package/android/src/test/java/com/audiobrowser/player/BrowseTilesTest.kt +385 -0
- package/android/src/test/java/com/audiobrowser/player/CapabilityControlsTest.kt +101 -58
- package/android/src/test/java/com/audiobrowser/player/CrossOriginHeaderStripperTest.kt +94 -0
- package/android/src/test/java/com/audiobrowser/player/MediaSessionSlotMappingTest.kt +45 -0
- package/android/src/test/java/com/audiobrowser/player/NowPlayingUpdaterTest.kt +42 -2
- package/android/src/test/java/com/audiobrowser/player/PlaybackErrorClassifierTest.kt +3 -4
- package/android/src/test/java/com/audiobrowser/player/PlaybackStateStoreTrackJsonTest.kt +55 -0
- package/android/src/test/java/com/audiobrowser/player/RetryLoadErrorHandlingPolicyTest.kt +3 -3
- package/android/src/test/java/com/audiobrowser/player/ShuffleOrderLedByTest.kt +79 -0
- package/android/src/test/java/com/audiobrowser/tls/AiaCertChaserTest.kt +197 -7
- package/android/src/test/java/com/audiobrowser/tls/AiaChasingTrustManagerTest.kt +325 -4
- package/android/src/test/java/com/audiobrowser/tls/CachingCertificateFetcherCallSiteTest.kt +322 -0
- package/android/src/test/java/com/audiobrowser/tls/CachingCertificateFetcherTest.kt +83 -0
- package/android/src/test/java/com/audiobrowser/util/BrowserPathHelperTest.kt +41 -16
- package/android/src/test/java/com/audiobrowser/util/MediaExtrasBuilderTest.kt +162 -0
- package/android/src/test/java/com/audiobrowser/util/TrackFactoryMediaIdTest.kt +7 -7
- package/ios/Browser/BrowserConfig.swift +102 -5
- package/ios/Browser/BrowserManager+URLResolution.swift +18 -14
- package/ios/Browser/BrowserManager.swift +230 -205
- package/ios/Browser/BrowserPathHelper.swift +44 -44
- package/ios/Browser/InertStyleDiagnostic.swift +279 -0
- package/ios/Browser/JsonModels.swift +264 -106
- package/ios/Browser/SearchDrillIn.swift +7 -7
- package/ios/Browser/SectionPresentation.swift +64 -0
- package/ios/Browser/SectionScope.swift +58 -24
- package/ios/Browser/StyleResolver.swift +58 -0
- package/ios/Browser/TabBarEntries.swift +9 -3
- package/ios/Browser/TrackIdTemplate.swift +37 -0
- package/ios/CarPlay/CarPlayArtworkResolver.swift +8 -7
- package/ios/CarPlay/CarPlayController.swift +227 -85
- package/ios/CarPlay/CarPlayImageLoader.swift +42 -20
- package/ios/CarPlay/CarPlayListItemFactory.swift +289 -84
- package/ios/CarPlay/CarPlayNowPlayingManager.swift +15 -12
- package/ios/CarPlay/RNABMediaAddHandler.swift +6 -6
- package/ios/CarPlay/RNABMediaAffinityHandler.swift +2 -2
- package/ios/CarPlay/RNABMediaIntentHandler.swift +16 -16
- package/ios/Extension/Capability+RemoteCommand.swift +1 -1
- package/ios/Extension/PlayerCapabilities+Favorite.swift +1 -15
- package/ios/Extension/ResolvedTrack+Copying.swift +13 -15
- package/ios/Extension/Section+Copying.swift +29 -0
- package/ios/Extension/String+IcyCharset.swift +21 -0
- package/ios/Extension/TimedMetadata+AVFoundation.swift +6 -4
- package/ios/Extension/Track+Copying.swift +8 -12
- package/ios/Extension/Track+Identity.swift +18 -0
- package/ios/Extension/UIApplication+ActiveScene.swift +27 -0
- package/ios/Http/HttpClient.swift +8 -2
- package/ios/HybridAudioBrowser.swift +253 -100
- package/ios/Model/NitroTypeStubs.swift +125 -23
- package/ios/Model/PlayerUpdateOptions.swift +7 -0
- package/ios/Model/RemoteCommand.swift +18 -0
- package/ios/Model/TrackPlayerError.swift +2 -2
- package/ios/Option/SessionCategories.swift +3 -2
- package/ios/Player/MediaIntentCriteria.swift +17 -9
- package/ios/Player/MediaLoader.swift +33 -9
- package/ios/Player/NowPlayingUpdater.swift +54 -6
- package/ios/Player/PlaybackCoordinator.swift +13 -6
- package/ios/Player/PlaybackErrorHandler.swift +4 -4
- package/ios/Player/PlaybackTimer.swift +8 -2
- package/ios/Player/QueueManager.swift +46 -13
- package/ios/Player/RetryManager.swift +80 -18
- package/ios/Player/SeekCompletionHandler.swift +3 -1
- package/ios/Player/ShuffleOrder.swift +33 -0
- package/ios/Player/SleepTimerHandling.swift +13 -0
- package/ios/RemoteCommand/RemoteCommandCallbacks.swift +47 -0
- package/ios/RemoteCommand/RemoteCommandController.swift +62 -24
- package/ios/Tests/BrowserPathHelperTests.swift +50 -20
- package/ios/Tests/CarPlayArtworkResolverTests.swift +24 -41
- package/ios/Tests/InertStyleDiagnosticTests.swift +200 -0
- package/ios/Tests/JsonModelsTests.swift +150 -1
- package/ios/Tests/LRUCacheTests.swift +111 -0
- package/ios/Tests/LoadSeekCoordinatorTests.swift +3 -1
- package/ios/Tests/MediaIntentCriteriaTests.swift +2 -2
- package/ios/Tests/PlaybackCoordinatorTests.swift +1 -1
- package/ios/Tests/PlaybackErrorHandlerTests.swift +3 -1
- package/ios/Tests/PlaybackStateStoreTests.swift +4 -3
- package/ios/Tests/PlayerTimeObserverTests.swift +37 -0
- package/ios/Tests/QueueManagerTests.swift +122 -10
- package/ios/Tests/RemoteCommandControllerTests.swift +172 -0
- package/ios/Tests/RemoteCommandTests.swift +67 -0
- package/ios/Tests/ResolvedTrackCopyingTests.swift +39 -35
- package/ios/Tests/RetryManagerTests.swift +89 -0
- package/ios/Tests/SearchDrillInTests.swift +16 -16
- package/ios/Tests/SectionPresentationTests.swift +90 -0
- package/ios/Tests/SectionScopeTests.swift +87 -55
- package/ios/Tests/StyleResolverTests.swift +127 -0
- package/ios/Tests/Support/TestTypes.swift +8 -1
- package/ios/Tests/TabBarEntriesTests.swift +19 -19
- package/ios/Tests/TimedMetadataAVFoundationTests.swift +42 -0
- package/ios/Tests/TrackIdTemplateTests.swift +67 -0
- package/ios/Tests/TrackIdentityTests.swift +20 -0
- package/ios/Tests/TrackSelectorTests.swift +168 -33
- package/ios/TrackPlayer.swift +63 -35
- package/ios/TrackPlayerCallbacks.swift +5 -38
- package/ios/TrackSelector.swift +45 -30
- package/ios/Util/ArtworkImageFetcher.swift +16 -1
- package/ios/Util/LRUCache.swift +4 -1
- package/ios/Util/NetworkMonitor.swift +43 -26
- package/ios/Util/SFSymbolRenderer.swift +24 -2
- package/ios/Util/SVGProcessor.swift +9 -2
- package/lib/commonjs/AudioBrowser.js +8 -8
- package/lib/commonjs/AudioBrowser.js.map +1 -1
- package/lib/commonjs/CLAUDE.md +52 -0
- package/lib/commonjs/features/browser-config.js +12 -8
- package/lib/commonjs/features/browser-config.js.map +1 -1
- package/lib/commonjs/features/browser.js +11 -3
- package/lib/commonjs/features/browser.js.map +1 -1
- package/lib/commonjs/features/carConnection.js +1 -1
- package/lib/commonjs/features/equalizer.js +1 -1
- package/lib/commonjs/features/errors.js +3 -3
- package/lib/commonjs/features/favorites.js +14 -11
- package/lib/commonjs/features/favorites.js.map +1 -1
- package/lib/commonjs/features/gate.js +16 -1
- package/lib/commonjs/features/gate.js.map +1 -1
- package/lib/commonjs/features/metadata.js +20 -3
- package/lib/commonjs/features/metadata.js.map +1 -1
- package/lib/commonjs/features/network.js +1 -1
- package/lib/commonjs/features/nowPlaying.js +1 -1
- package/lib/commonjs/features/output.js +1 -1
- package/lib/commonjs/features/playback/controls.js +4 -2
- package/lib/commonjs/features/playback/controls.js.map +1 -1
- package/lib/commonjs/features/playback/playWhenReady.js +1 -1
- package/lib/commonjs/features/playback/playing.js +1 -1
- package/lib/commonjs/features/playback/progress.js +3 -2
- package/lib/commonjs/features/playback/progress.js.map +1 -1
- package/lib/commonjs/features/playback/rate.js +8 -1
- package/lib/commonjs/features/playback/rate.js.map +1 -1
- package/lib/commonjs/features/playback/state.js +3 -4
- package/lib/commonjs/features/playback/state.js.map +1 -1
- package/lib/commonjs/features/playback/trackPlaybackTime.js +0 -6
- package/lib/commonjs/features/playback/trackPlaybackTime.js.map +1 -1
- package/lib/commonjs/features/playback/volume.js +1 -1
- package/lib/commonjs/features/player/options.js +48 -34
- package/lib/commonjs/features/player/options.js.map +1 -1
- package/lib/commonjs/features/player/setup.js +18 -9
- package/lib/commonjs/features/player/setup.js.map +1 -1
- package/lib/commonjs/features/player/validateOptions.js +23 -0
- package/lib/commonjs/features/player/validateOptions.js.map +1 -0
- package/lib/commonjs/features/queue/activeTrack.js +15 -4
- package/lib/commonjs/features/queue/activeTrack.js.map +1 -1
- package/lib/commonjs/features/queue/queue.js +13 -6
- package/lib/commonjs/features/queue/queue.js.map +1 -1
- package/lib/commonjs/features/queue/repeatMode.js +1 -1
- package/lib/commonjs/features/queue/shuffle.js +1 -1
- package/lib/commonjs/features/remoteControls.js +13 -92
- package/lib/commonjs/features/remoteControls.js.map +1 -1
- package/lib/commonjs/features/sleepTimer.js +13 -1
- package/lib/commonjs/features/sleepTimer.js.map +1 -1
- package/lib/commonjs/test-utils/reactNativeStub.js +65 -0
- package/lib/commonjs/test-utils/reactNativeStub.js.map +1 -0
- package/lib/commonjs/utils/LazyNativeEmitter.js +28 -14
- package/lib/commonjs/utils/LazyNativeEmitter.js.map +1 -1
- package/lib/commonjs/utils/NativeUpdatedValue.js +31 -13
- package/lib/commonjs/utils/NativeUpdatedValue.js.map +1 -1
- package/lib/commonjs/utils/getTrackIdentity.js +24 -0
- package/lib/commonjs/utils/getTrackIdentity.js.map +1 -0
- package/lib/commonjs/utils/useNativeValueRefreshedBy.js +33 -0
- package/lib/commonjs/utils/useNativeValueRefreshedBy.js.map +1 -0
- package/lib/commonjs/web/NativeAudioBrowser.js +200 -75
- package/lib/commonjs/web/NativeAudioBrowser.js.map +1 -1
- package/lib/commonjs/web/TrackPlayer/LoadAttempt.js +37 -0
- package/lib/commonjs/web/TrackPlayer/LoadAttempt.js.map +1 -0
- package/lib/commonjs/web/TrackPlayer/PlaybackStateMachine.js +18 -2
- package/lib/commonjs/web/TrackPlayer/PlaybackStateMachine.js.map +1 -1
- package/lib/commonjs/web/TrackPlayer/Player.js +254 -39
- package/lib/commonjs/web/TrackPlayer/Player.js.map +1 -1
- package/lib/commonjs/web/TrackPlayer/QueueManager.js +14 -0
- package/lib/commonjs/web/TrackPlayer/QueueManager.js.map +1 -1
- package/lib/commonjs/web/TrackPlayer/QueuePlayer.js +33 -12
- package/lib/commonjs/web/TrackPlayer/QueuePlayer.js.map +1 -1
- package/lib/commonjs/web/browser/BrowserManager.js +175 -100
- package/lib/commonjs/web/browser/BrowserManager.js.map +1 -1
- package/lib/commonjs/web/browser/FavoriteManager.js +30 -21
- package/lib/commonjs/web/browser/FavoriteManager.js.map +1 -1
- package/lib/commonjs/web/browser/SearchManager.js +18 -23
- package/lib/commonjs/web/browser/SearchManager.js.map +1 -1
- package/lib/commonjs/web/browser/assertBrowsePageShape.js +2 -2
- package/lib/commonjs/web/browser/assertBrowsePageShape.js.map +1 -1
- package/lib/commonjs/web/browser/classifyTrackNavigation.js +9 -9
- package/lib/commonjs/web/browser/classifyTrackNavigation.js.map +1 -1
- package/lib/commonjs/web/browser/sections.js +89 -0
- package/lib/commonjs/web/browser/sections.js.map +1 -0
- package/lib/commonjs/web/http/RequestConfigBuilder.js +110 -27
- package/lib/commonjs/web/http/RequestConfigBuilder.js.map +1 -1
- package/lib/commonjs/web/http/followMediaRedirect.js +219 -0
- package/lib/commonjs/web/http/followMediaRedirect.js.map +1 -0
- package/lib/commonjs/web/player/NowPlayingManager.js +4 -3
- package/lib/commonjs/web/player/NowPlayingManager.js.map +1 -1
- package/lib/commonjs/web/util/BrowserPathHelper.js +56 -11
- package/lib/commonjs/web/util/BrowserPathHelper.js.map +1 -1
- package/lib/module/AudioBrowser.js +2 -1
- package/lib/module/AudioBrowser.js.map +1 -1
- package/lib/module/CLAUDE.md +52 -0
- package/lib/module/features/browser-config.js +12 -8
- package/lib/module/features/browser-config.js.map +1 -1
- package/lib/module/features/browser.js +11 -3
- package/lib/module/features/browser.js.map +1 -1
- package/lib/module/features/carConnection.js +1 -1
- package/lib/module/features/equalizer.js +1 -1
- package/lib/module/features/errors.js +3 -3
- package/lib/module/features/favorites.js +14 -11
- package/lib/module/features/favorites.js.map +1 -1
- package/lib/module/features/gate.js +16 -1
- package/lib/module/features/gate.js.map +1 -1
- package/lib/module/features/metadata.js +20 -3
- package/lib/module/features/metadata.js.map +1 -1
- package/lib/module/features/network.js +1 -1
- package/lib/module/features/nowPlaying.js +1 -1
- package/lib/module/features/output.js +1 -1
- package/lib/module/features/playback/controls.js +4 -2
- package/lib/module/features/playback/controls.js.map +1 -1
- package/lib/module/features/playback/playWhenReady.js +1 -1
- package/lib/module/features/playback/playing.js +1 -1
- package/lib/module/features/playback/progress.js +3 -2
- package/lib/module/features/playback/progress.js.map +1 -1
- package/lib/module/features/playback/rate.js +8 -1
- package/lib/module/features/playback/rate.js.map +1 -1
- package/lib/module/features/playback/state.js +3 -4
- package/lib/module/features/playback/state.js.map +1 -1
- package/lib/module/features/playback/trackPlaybackTime.js +0 -5
- package/lib/module/features/playback/trackPlaybackTime.js.map +1 -1
- package/lib/module/features/playback/volume.js +1 -1
- package/lib/module/features/player/options.js +47 -32
- package/lib/module/features/player/options.js.map +1 -1
- package/lib/module/features/player/setup.js +17 -8
- package/lib/module/features/player/setup.js.map +1 -1
- package/lib/module/features/player/validateOptions.js +19 -0
- package/lib/module/features/player/validateOptions.js.map +1 -0
- package/lib/module/features/queue/activeTrack.js +15 -4
- package/lib/module/features/queue/activeTrack.js.map +1 -1
- package/lib/module/features/queue/queue.js +13 -6
- package/lib/module/features/queue/queue.js.map +1 -1
- package/lib/module/features/queue/repeatMode.js +1 -1
- package/lib/module/features/queue/shuffle.js +1 -1
- package/lib/module/features/remoteControls.js +13 -92
- package/lib/module/features/remoteControls.js.map +1 -1
- package/lib/module/features/sleepTimer.js +13 -1
- package/lib/module/features/sleepTimer.js.map +1 -1
- package/lib/module/test-utils/reactNativeStub.js +58 -0
- package/lib/module/test-utils/reactNativeStub.js.map +1 -0
- package/lib/module/utils/LazyNativeEmitter.js +28 -14
- package/lib/module/utils/LazyNativeEmitter.js.map +1 -1
- package/lib/module/utils/NativeUpdatedValue.js +31 -13
- package/lib/module/utils/NativeUpdatedValue.js.map +1 -1
- package/lib/module/utils/getTrackIdentity.js +20 -0
- package/lib/module/utils/getTrackIdentity.js.map +1 -0
- package/lib/module/utils/useNativeValueRefreshedBy.js +29 -0
- package/lib/module/utils/useNativeValueRefreshedBy.js.map +1 -0
- package/lib/module/web/NativeAudioBrowser.js +200 -75
- package/lib/module/web/NativeAudioBrowser.js.map +1 -1
- package/lib/module/web/TrackPlayer/LoadAttempt.js +32 -0
- package/lib/module/web/TrackPlayer/LoadAttempt.js.map +1 -0
- package/lib/module/web/TrackPlayer/PlaybackStateMachine.js +18 -2
- package/lib/module/web/TrackPlayer/PlaybackStateMachine.js.map +1 -1
- package/lib/module/web/TrackPlayer/Player.js +254 -39
- package/lib/module/web/TrackPlayer/Player.js.map +1 -1
- package/lib/module/web/TrackPlayer/QueueManager.js +14 -0
- package/lib/module/web/TrackPlayer/QueueManager.js.map +1 -1
- package/lib/module/web/TrackPlayer/QueuePlayer.js +33 -12
- package/lib/module/web/TrackPlayer/QueuePlayer.js.map +1 -1
- package/lib/module/web/browser/BrowserManager.js +175 -100
- package/lib/module/web/browser/BrowserManager.js.map +1 -1
- package/lib/module/web/browser/FavoriteManager.js +31 -21
- package/lib/module/web/browser/FavoriteManager.js.map +1 -1
- package/lib/module/web/browser/SearchManager.js +18 -23
- package/lib/module/web/browser/SearchManager.js.map +1 -1
- package/lib/module/web/browser/assertBrowsePageShape.js +2 -2
- package/lib/module/web/browser/assertBrowsePageShape.js.map +1 -1
- package/lib/module/web/browser/classifyTrackNavigation.js +9 -9
- package/lib/module/web/browser/classifyTrackNavigation.js.map +1 -1
- package/lib/module/web/browser/sections.js +83 -0
- package/lib/module/web/browser/sections.js.map +1 -0
- package/lib/module/web/http/RequestConfigBuilder.js +110 -27
- package/lib/module/web/http/RequestConfigBuilder.js.map +1 -1
- package/lib/module/web/http/followMediaRedirect.js +215 -0
- package/lib/module/web/http/followMediaRedirect.js.map +1 -0
- package/lib/module/web/player/NowPlayingManager.js +4 -3
- package/lib/module/web/player/NowPlayingManager.js.map +1 -1
- package/lib/module/web/util/BrowserPathHelper.js +56 -11
- package/lib/module/web/util/BrowserPathHelper.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/AudioBrowser.d.ts +1 -1
- package/lib/typescript/src/AudioBrowser.d.ts.map +1 -1
- package/lib/typescript/src/features/browser-config.d.ts.map +1 -1
- package/lib/typescript/src/features/browser.d.ts +10 -2
- package/lib/typescript/src/features/browser.d.ts.map +1 -1
- package/lib/typescript/src/features/carConnection.d.ts +1 -1
- package/lib/typescript/src/features/equalizer.d.ts +1 -1
- package/lib/typescript/src/features/errors.d.ts +3 -3
- package/lib/typescript/src/features/favorites.d.ts +14 -11
- package/lib/typescript/src/features/favorites.d.ts.map +1 -1
- package/lib/typescript/src/features/gate.d.ts +18 -2
- package/lib/typescript/src/features/gate.d.ts.map +1 -1
- package/lib/typescript/src/features/metadata.d.ts +20 -3
- package/lib/typescript/src/features/metadata.d.ts.map +1 -1
- package/lib/typescript/src/features/network.d.ts +1 -1
- package/lib/typescript/src/features/nowPlaying.d.ts +1 -1
- package/lib/typescript/src/features/output.d.ts +1 -1
- package/lib/typescript/src/features/playback/controls.d.ts +4 -2
- package/lib/typescript/src/features/playback/controls.d.ts.map +1 -1
- package/lib/typescript/src/features/playback/playWhenReady.d.ts +1 -1
- package/lib/typescript/src/features/playback/playing.d.ts +1 -1
- package/lib/typescript/src/features/playback/progress.d.ts +1 -1
- package/lib/typescript/src/features/playback/progress.d.ts.map +1 -1
- package/lib/typescript/src/features/playback/rate.d.ts +8 -1
- package/lib/typescript/src/features/playback/rate.d.ts.map +1 -1
- package/lib/typescript/src/features/playback/state.d.ts +3 -4
- package/lib/typescript/src/features/playback/state.d.ts.map +1 -1
- package/lib/typescript/src/features/playback/trackPlaybackTime.d.ts +1 -1
- package/lib/typescript/src/features/playback/trackPlaybackTime.d.ts.map +1 -1
- package/lib/typescript/src/features/playback/volume.d.ts +1 -1
- package/lib/typescript/src/features/player/options.d.ts +108 -56
- package/lib/typescript/src/features/player/options.d.ts.map +1 -1
- package/lib/typescript/src/features/player/setup.d.ts +14 -4
- package/lib/typescript/src/features/player/setup.d.ts.map +1 -1
- package/lib/typescript/src/features/player/validateOptions.d.ts +2 -0
- package/lib/typescript/src/features/player/validateOptions.d.ts.map +1 -0
- package/lib/typescript/src/features/queue/activeTrack.d.ts +9 -2
- package/lib/typescript/src/features/queue/activeTrack.d.ts.map +1 -1
- package/lib/typescript/src/features/queue/queue.d.ts +7 -4
- package/lib/typescript/src/features/queue/queue.d.ts.map +1 -1
- package/lib/typescript/src/features/queue/repeatMode.d.ts +1 -1
- package/lib/typescript/src/features/queue/shuffle.d.ts +1 -1
- package/lib/typescript/src/features/remoteControls.d.ts +23 -22
- package/lib/typescript/src/features/remoteControls.d.ts.map +1 -1
- package/lib/typescript/src/features/sleepTimer.d.ts +1 -1
- package/lib/typescript/src/features/sleepTimer.d.ts.map +1 -1
- package/lib/typescript/src/test-utils/reactNativeStub.d.ts +36 -0
- package/lib/typescript/src/test-utils/reactNativeStub.d.ts.map +1 -0
- package/lib/typescript/src/types/browser-native.d.ts +3 -2
- package/lib/typescript/src/types/browser-native.d.ts.map +1 -1
- package/lib/typescript/src/types/browser-nodes.d.ts +380 -126
- package/lib/typescript/src/types/browser-nodes.d.ts.map +1 -1
- package/lib/typescript/src/types/browser.d.ts +82 -57
- package/lib/typescript/src/types/browser.d.ts.map +1 -1
- package/lib/typescript/src/utils/LazyNativeEmitter.d.ts +19 -16
- package/lib/typescript/src/utils/LazyNativeEmitter.d.ts.map +1 -1
- package/lib/typescript/src/utils/NativeUpdatedValue.d.ts +24 -19
- package/lib/typescript/src/utils/NativeUpdatedValue.d.ts.map +1 -1
- package/lib/typescript/src/utils/getTrackIdentity.d.ts +18 -0
- package/lib/typescript/src/utils/getTrackIdentity.d.ts.map +1 -0
- package/lib/typescript/src/utils/useNativeValueRefreshedBy.d.ts +21 -0
- package/lib/typescript/src/utils/useNativeValueRefreshedBy.d.ts.map +1 -0
- package/nitrogen/generated/android/AudioBrowser+autolinking.cmake +1 -2
- package/nitrogen/generated/android/AudioBrowserOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JAndroidOptions.hpp +10 -10
- package/nitrogen/generated/android/c++/{JFavoritesMatchMode.hpp → JArtworkRendering.hpp} +15 -15
- package/nitrogen/generated/android/c++/JArtworkRequestConfig.hpp +8 -3
- package/nitrogen/generated/android/c++/JBrowseResult.hpp +16 -4
- package/nitrogen/generated/android/c++/JCarPlayPlayingIndicatorLocation.hpp +58 -0
- package/nitrogen/generated/android/c++/JCardImage.hpp +58 -0
- package/nitrogen/generated/android/c++/JFavoriteChangedEvent.hpp +8 -3
- package/nitrogen/generated/android/c++/JFormatNowPlayingParams.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_RequestConfig___Track.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__optional_NowPlayingUpdate____FormatNowPlayingParams.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__optional_std__string____Track.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_RequestConfig_____Track.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__vector_Track______SearchParams.hpp +8 -2
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_void_____TrackLoadEvent.hpp +8 -2
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__string__.hpp +102 -0
- package/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__variant_ResolvedTrack__BrowseError__std__shared_ptr_Promise_std__variant_ResolvedTrack__BrowseError_______BrowserSourceCallbackParam.hpp +16 -4
- package/nitrogen/generated/android/c++/JFunc_void_FavoriteChangedEvent.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_void_Options.hpp +7 -10
- package/nitrogen/generated/android/c++/JFunc_void_PlaybackActiveTrackChangedEvent.hpp +8 -3
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_ResolvedTrack_.hpp +15 -3
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_Track_.hpp +8 -2
- package/nitrogen/generated/android/c++/JGridTile.hpp +61 -0
- package/nitrogen/generated/android/c++/JHybridAudioBrowserSpec.cpp +45 -25
- package/nitrogen/generated/android/c++/JHybridAudioBrowserSpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JIOSOptions.hpp +9 -3
- package/nitrogen/generated/android/c++/JImageShape.hpp +58 -0
- package/nitrogen/generated/android/c++/JMediaRequestConfig.hpp +8 -3
- package/nitrogen/generated/android/c++/JNativeBrowserConfiguration.hpp +36 -11
- package/nitrogen/generated/android/c++/JNativeRouteEntry.hpp +14 -2
- package/nitrogen/generated/android/c++/JNativeSetupPlayerOptions.hpp +15 -12
- package/nitrogen/generated/android/c++/JNativeUpdateOptions.hpp +7 -10
- package/nitrogen/generated/android/c++/JNitroAndroidUpdateOptions.hpp +10 -10
- package/nitrogen/generated/android/c++/JNitroIOSUpdateOptions.hpp +9 -3
- package/nitrogen/generated/android/c++/JOptions.hpp +7 -10
- package/nitrogen/generated/android/c++/JPlaybackActiveTrackChangedEvent.hpp +8 -3
- package/nitrogen/generated/android/c++/JPlayerCapabilities.hpp +5 -11
- package/nitrogen/generated/android/c++/{JNotificationButton.hpp → JRemoteButton.hpp} +19 -19
- package/nitrogen/generated/android/c++/JRemoteButtonLayout.hpp +86 -0
- package/nitrogen/generated/android/c++/JResolvedTrack.hpp +57 -49
- package/nitrogen/generated/android/c++/JSection.hpp +116 -0
- package/nitrogen/generated/android/c++/JSectionStyle.hpp +96 -0
- package/nitrogen/generated/android/c++/JStyleDisplay.hpp +58 -0
- package/nitrogen/generated/android/c++/JTrack.hpp +25 -46
- package/nitrogen/generated/android/c++/JTrackLoadEvent.hpp +8 -2
- package/nitrogen/generated/android/c++/JTrackStyle.hpp +46 -18
- package/nitrogen/generated/android/c++/JVariant_NullType_RemoteButtonLayout.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_RemoteButtonLayout.hpp +75 -0
- package/nitrogen/generated/android/c++/JVariant_ResolvedTrack_BrowseError_Promise_BrowseResult_.hpp +16 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/AndroidOptions.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{FavoritesMatchMode.kt → ArtworkRendering.kt} +5 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/CarPlayPlayingIndicatorLocation.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/CardImage.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/Func_std__shared_ptr_Promise_std__string__.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/GridTile.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/HybridAudioBrowserSpec.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/IOSOptions.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/ImageShape.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NativeBrowserConfiguration.kt +8 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NitroAndroidUpdateOptions.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NitroIOSUpdateOptions.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/PlayerCapabilities.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{NotificationButton.kt → RemoteButton.kt} +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/RemoteButtonLayout.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/ResolvedTrack.kt +12 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{FavoriteConfig.kt → Section.kt} +15 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/SectionStyle.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/StyleDisplay.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/Track.kt +6 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/TrackStyle.kt +35 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/{Variant_NullType_NotificationButtonLayout.kt → Variant_NullType_RemoteButtonLayout.kt} +9 -9
- package/nitrogen/generated/ios/AudioBrowser-Swift-Cxx-Bridge.cpp +9 -0
- package/nitrogen/generated/ios/AudioBrowser-Swift-Cxx-Bridge.hpp +244 -133
- package/nitrogen/generated/ios/AudioBrowser-Swift-Cxx-Umbrella.hpp +31 -16
- package/nitrogen/generated/ios/c++/HybridAudioBrowserSpecSwift.hpp +33 -18
- package/nitrogen/generated/ios/swift/AndroidOptions.swift +12 -12
- package/nitrogen/generated/ios/swift/ArtworkRendering.swift +40 -0
- package/nitrogen/generated/ios/swift/CarPlayPlayingIndicatorLocation.swift +40 -0
- package/nitrogen/generated/ios/swift/CardImage.swift +40 -0
- package/nitrogen/generated/ios/swift/Func_std__shared_ptr_Promise_std__string__.swift +54 -0
- package/nitrogen/generated/ios/swift/GridTile.swift +44 -0
- package/nitrogen/generated/ios/swift/HybridAudioBrowserSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridAudioBrowserSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/IOSOptions.swift +7 -2
- package/nitrogen/generated/ios/swift/ImageShape.swift +40 -0
- package/nitrogen/generated/ios/swift/NativeBrowserConfiguration.swift +52 -5
- package/nitrogen/generated/ios/swift/NitroAndroidUpdateOptions.swift +12 -12
- package/nitrogen/generated/ios/swift/NitroIOSUpdateOptions.swift +12 -1
- package/nitrogen/generated/ios/swift/PlayerCapabilities.swift +8 -27
- package/nitrogen/generated/ios/swift/{NotificationButton.swift → RemoteButton.swift} +6 -6
- package/nitrogen/generated/ios/swift/RemoteButtonLayout.swift +57 -0
- package/nitrogen/generated/ios/swift/ResolvedTrack.swift +62 -73
- package/nitrogen/generated/ios/swift/Section.swift +82 -0
- package/nitrogen/generated/ios/swift/SectionStyle.swift +133 -0
- package/nitrogen/generated/ios/swift/StyleDisplay.swift +40 -0
- package/nitrogen/generated/ios/swift/Track.swift +28 -63
- package/nitrogen/generated/ios/swift/TrackStyle.swift +86 -22
- package/nitrogen/generated/ios/swift/{Variant_NullType_NotificationButtonLayout.swift → Variant_NullType_RemoteButtonLayout.swift} +3 -3
- package/nitrogen/generated/shared/c++/AndroidOptions.hpp +8 -8
- package/nitrogen/generated/shared/c++/{FavoritesMatchMode.hpp → ArtworkRendering.hpp} +17 -17
- package/nitrogen/generated/shared/c++/CarPlayPlayingIndicatorLocation.hpp +76 -0
- package/nitrogen/generated/shared/c++/CardImage.hpp +76 -0
- package/nitrogen/generated/shared/c++/GridTile.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridAudioBrowserSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridAudioBrowserSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/IOSOptions.hpp +9 -2
- package/nitrogen/generated/shared/c++/ImageShape.hpp +76 -0
- package/nitrogen/generated/shared/c++/NativeBrowserConfiguration.hpp +10 -6
- package/nitrogen/generated/shared/c++/NitroAndroidUpdateOptions.hpp +8 -8
- package/nitrogen/generated/shared/c++/NitroIOSUpdateOptions.hpp +9 -2
- package/nitrogen/generated/shared/c++/PlayerCapabilities.hpp +6 -9
- package/nitrogen/generated/shared/c++/{NotificationButton.hpp → RemoteButton.hpp} +19 -19
- package/nitrogen/generated/shared/c++/RemoteButtonLayout.hpp +94 -0
- package/nitrogen/generated/shared/c++/ResolvedTrack.hpp +33 -37
- package/nitrogen/generated/shared/c++/Section.hpp +102 -0
- package/nitrogen/generated/shared/c++/SectionStyle.hpp +126 -0
- package/nitrogen/generated/shared/c++/StyleDisplay.hpp +76 -0
- package/nitrogen/generated/shared/c++/Track.hpp +18 -30
- package/nitrogen/generated/shared/c++/TrackStyle.hpp +73 -34
- package/package.json +24 -11
- package/src/AudioBrowser.ts +2 -1
- package/src/CLAUDE.md +52 -0
- package/src/features/battery.test.ts +79 -0
- package/src/features/browser-config.test.ts +21 -6
- package/src/features/browser-config.ts +12 -8
- package/src/features/browser.test.ts +1 -1
- package/src/features/browser.ts +11 -3
- package/src/features/carConnection.ts +1 -1
- package/src/features/equalizer.ts +1 -1
- package/src/features/errors.ts +3 -3
- package/src/features/favorites.ts +14 -11
- package/src/features/gate.ts +16 -1
- package/src/features/hook-wiring.test.ts +302 -0
- package/src/features/metadata.ts +20 -3
- package/src/features/network.ts +1 -1
- package/src/features/nowPlaying.ts +1 -1
- package/src/features/output.ts +1 -1
- package/src/features/playback/controls.ts +4 -2
- package/src/features/playback/playWhenReady.ts +1 -1
- package/src/features/playback/playing.ts +1 -1
- package/src/features/playback/progress.test.ts +169 -0
- package/src/features/playback/progress.ts +3 -2
- package/src/features/playback/rate.ts +8 -1
- package/src/features/playback/state.ts +3 -4
- package/src/features/playback/trackPlaybackTime.test.ts +16 -6
- package/src/features/playback/trackPlaybackTime.ts +1 -6
- package/src/features/playback/volume.ts +1 -1
- package/src/features/player/options.ts +126 -76
- package/src/features/player/setup.test.ts +24 -7
- package/src/features/player/setup.ts +22 -10
- package/src/features/player/validateOptions.ts +21 -0
- package/src/features/queue/activeTrack.ts +15 -4
- package/src/features/queue/queue.ts +13 -6
- package/src/features/queue/repeatMode.ts +1 -1
- package/src/features/queue/shuffle.ts +1 -1
- package/src/features/remoteControls.ts +13 -92
- package/src/features/sleepTimer.test.ts +172 -0
- package/src/features/sleepTimer.ts +9 -1
- package/src/nitro-stub-drift.test.ts +277 -0
- package/src/public-surface.test.ts +147 -0
- package/src/specs/audio-browser.nitro.ts +5 -4
- package/src/style-resolution.test.ts +210 -0
- package/src/test-utils/reactNativeStub.ts +60 -0
- package/src/types/browser-native.ts +7 -3
- package/src/types/browser-nodes.ts +396 -134
- package/src/types/browser.ts +85 -59
- package/src/utils/LazyNativeEmitter.ts +28 -15
- package/src/utils/NativeUpdatedValue.ts +29 -13
- package/src/utils/getTrackIdentity.ts +20 -0
- package/src/utils/useDebug.test.ts +182 -0
- package/src/utils/useNativeUpdatedValue.test.ts +103 -0
- package/src/utils/useNativeValueRefreshedBy.ts +38 -0
- package/src/web/NativeAudioBrowser.playWhenReady.test.ts +232 -2
- package/src/web/NativeAudioBrowser.ts +239 -82
- package/src/web/TrackPlayer/LoadAttempt.ts +29 -0
- package/src/web/TrackPlayer/PlaybackStateMachine.test.ts +60 -13
- package/src/web/TrackPlayer/PlaybackStateMachine.ts +22 -6
- package/src/web/TrackPlayer/Player.dispatch.test.ts +5 -3
- package/src/web/TrackPlayer/Player.load.test.ts +137 -1
- package/src/web/TrackPlayer/Player.ts +284 -37
- package/src/web/TrackPlayer/QueueManager.test.ts +29 -0
- package/src/web/TrackPlayer/QueueManager.ts +14 -0
- package/src/web/TrackPlayer/QueuePlayer.ts +33 -14
- package/src/web/__tests__/lifecycle.test.ts +345 -0
- package/src/web/__tests__/lifecycleHarness.ts +351 -0
- package/src/web/__tests__/loadEdgeCases.test.ts +246 -0
- package/src/web/__tests__/loadSupersession.test.ts +175 -0
- package/src/web/__tests__/retry.test.ts +169 -0
- package/src/web/browser/BrowserManager.ts +209 -111
- package/src/web/browser/FavoriteManager.test.ts +84 -0
- package/src/web/browser/FavoriteManager.ts +28 -23
- package/src/web/browser/SearchManager.test.ts +75 -0
- package/src/web/browser/SearchManager.ts +25 -28
- package/src/web/browser/__tests__/artwork-resolution.test.ts +117 -0
- package/src/web/browser/__tests__/layer-resolver.test.ts +35 -0
- package/src/web/browser/__tests__/search-artwork.test.ts +46 -0
- package/src/web/browser/__tests__/search-navigation.test.ts +76 -0
- package/src/web/browser/assertBrowsePageShape.test.ts +1 -1
- package/src/web/browser/assertBrowsePageShape.ts +5 -3
- package/src/web/browser/classifyTrackNavigation.test.ts +10 -8
- package/src/web/browser/classifyTrackNavigation.ts +9 -9
- package/src/web/browser/parseSearchResponse.test.ts +8 -2
- package/src/web/browser/sections.test.ts +91 -0
- package/src/web/browser/sections.ts +72 -0
- package/src/web/http/RequestConfigBuilder.test.ts +241 -1
- package/src/web/http/RequestConfigBuilder.ts +140 -33
- package/src/web/http/followMediaRedirect.test.ts +289 -0
- package/src/web/http/followMediaRedirect.ts +253 -0
- package/src/web/player/NowPlayingManager.ts +4 -3
- package/src/web/util/BrowserPathHelper.test.ts +52 -0
- package/src/web/util/BrowserPathHelper.ts +61 -13
- package/website/guide/android-auto.md +114 -0
- package/website/guide/android-certificates.md +409 -0
- package/website/guide/artwork.md +255 -0
- package/website/guide/audio-output.md +135 -0
- package/website/guide/automotive.md +86 -0
- package/website/guide/basic-usage.md +151 -0
- package/website/guide/battery.md +115 -0
- package/website/guide/browser.md +581 -0
- package/website/guide/carplay.md +620 -0
- package/website/guide/configuration.md +173 -0
- package/website/guide/equalizer.md +231 -0
- package/website/guide/errors.md +310 -0
- package/website/guide/favorites.md +154 -0
- package/website/guide/gate.md +143 -0
- package/website/guide/getting-started.md +46 -0
- package/website/guide/hooks.md +238 -0
- package/website/guide/live-streams.md +125 -0
- package/website/guide/metadata.md +239 -0
- package/website/guide/migrating-from-track-player.md +244 -0
- package/website/guide/native-callback-fetch.md +127 -0
- package/website/guide/network.md +86 -0
- package/website/guide/now-playing.md +175 -0
- package/website/guide/playback.md +328 -0
- package/website/guide/queue.md +300 -0
- package/website/guide/remote-controls.md +256 -0
- package/website/guide/search.md +255 -0
- package/website/guide/sleep-timer.md +268 -0
- package/website/guide/track.md +247 -0
- package/ios/CarPlay/ImageRowItem+CarPlay.swift +0 -19
- package/ios/Model/MediaURL.swift +0 -67
- package/nitrogen/generated/android/c++/JFavoriteConfig.hpp +0 -58
- package/nitrogen/generated/android/c++/JImageRowItem.hpp +0 -105
- package/nitrogen/generated/android/c++/JNotificationButtonLayout.hpp +0 -94
- package/nitrogen/generated/android/c++/JVariant_Boolean_FavoriteConfig.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_Boolean_FavoriteConfig.hpp +0 -71
- package/nitrogen/generated/android/c++/JVariant_NullType_NotificationButtonLayout.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_NullType_NotificationButtonLayout.hpp +0 -75
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/ImageRowItem.kt +0 -68
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/NotificationButtonLayout.kt +0 -50
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/audiobrowser/Variant_Boolean_FavoriteConfig.kt +0 -53
- package/nitrogen/generated/ios/swift/FavoriteConfig.swift +0 -29
- package/nitrogen/generated/ios/swift/FavoritesMatchMode.swift +0 -40
- package/nitrogen/generated/ios/swift/ImageRowItem.swift +0 -195
- package/nitrogen/generated/ios/swift/NotificationButtonLayout.swift +0 -92
- package/nitrogen/generated/ios/swift/Variant_Bool_FavoriteConfig.swift +0 -18
- package/nitrogen/generated/shared/c++/FavoriteConfig.hpp +0 -84
- package/nitrogen/generated/shared/c++/ImageRowItem.hpp +0 -129
- package/nitrogen/generated/shared/c++/NotificationButtonLayout.hpp +0 -102
|
@@ -1,5 +1,216 @@
|
|
|
1
1
|
import type { CarPlaySiriListButtonPosition, HttpMethod } from './browser';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* How a holder's *children* lay out — CSS's inner display type, honored
|
|
4
|
+
* literally (`display: 'grid'` in CSS describes the children, not the
|
|
5
|
+
* element).
|
|
6
|
+
*
|
|
7
|
+
* - `'list'` (default) — full-width rows on every surface.
|
|
8
|
+
* - `'grid'` — artwork tiles; wraps unless {@link SectionStyle.gridWrap}
|
|
9
|
+
* is `false`. Tiles presume artwork: an artwork-less child renders a
|
|
10
|
+
* placeholder tile plus its title. On CarPlay a *wrapping* grid needs
|
|
11
|
+
* iOS 26+ and renders a list before that; a single-line grid renders
|
|
12
|
+
* on every OS.
|
|
13
|
+
*/
|
|
14
|
+
export type StyleDisplay = 'list' | 'grid';
|
|
15
|
+
/**
|
|
16
|
+
* How a track's artwork is rendered.
|
|
17
|
+
*
|
|
18
|
+
* - `'original'` (default) — drawn as-is.
|
|
19
|
+
* - `'stencil'` — treated as a monochrome glyph and tinted to the
|
|
20
|
+
* surface's appearance (black in light mode, white in dark). For
|
|
21
|
+
* monochrome logos and icons; full-color artwork should stay
|
|
22
|
+
* `'original'`.
|
|
23
|
+
*/
|
|
24
|
+
export type ArtworkRendering = 'original' | 'stencil';
|
|
25
|
+
/**
|
|
26
|
+
* The shape a grid tile's artwork is cropped to.
|
|
27
|
+
*
|
|
28
|
+
* - `'rounded-rectangle'` (default) — the standard tile crop.
|
|
29
|
+
* - `'circular'` — the standard presentation for *people* (artists, hosts,
|
|
30
|
+
* DJs). Shape encodes the kind of item, so mixed grids legitimately
|
|
31
|
+
* render circular artists next to rounded albums.
|
|
32
|
+
*
|
|
33
|
+
* Named after Apple's `imageShape` parameter (a platform passthrough), and
|
|
34
|
+
* deliberately without a grid prefix: every tile presentation that takes a
|
|
35
|
+
* shape reads the same property.
|
|
36
|
+
*/
|
|
37
|
+
export type ImageShape = 'circular' | 'rounded-rectangle';
|
|
38
|
+
/**
|
|
39
|
+
* The kind of tile a grid renders.
|
|
40
|
+
*
|
|
41
|
+
* - `'plain'` (default) — artwork tiles with a title.
|
|
42
|
+
* - `'card'` — a larger card with title/subtitle and a
|
|
43
|
+
* {@link TrackStyle.cardTint} color; its image mode is
|
|
44
|
+
* {@link TrackStyle.cardImage}. Cards have no shape.
|
|
45
|
+
* - `'condensed'` — a denser cell carrying title + subtitle; takes
|
|
46
|
+
* {@link TrackStyle.imageShape} and {@link TrackStyle.accessorySymbol}
|
|
47
|
+
* like a plain tile.
|
|
48
|
+
*
|
|
49
|
+
* Element families are mutually exclusive within a container, so this is
|
|
50
|
+
* a container property — hence the enum, and the `grid` prefix.
|
|
51
|
+
*/
|
|
52
|
+
export type GridTile = 'plain' | 'card' | 'condensed';
|
|
53
|
+
/**
|
|
54
|
+
* How a card tile uses its image.
|
|
55
|
+
*
|
|
56
|
+
* - `'normal'` (default) — image above the labels;
|
|
57
|
+
* {@link TrackStyle.cardTint} colors a gradient behind the labels.
|
|
58
|
+
* - `'background'` — the image fills the card full-height with the labels
|
|
59
|
+
* overlaid; `cardTint` becomes the color behind them. Selects the larger
|
|
60
|
+
* artwork target size.
|
|
61
|
+
*
|
|
62
|
+
* An enum rather than a boolean: it names the card's image mode and
|
|
63
|
+
* leaves room for future modes.
|
|
64
|
+
*/
|
|
65
|
+
export type CardImage = 'normal' | 'background';
|
|
66
|
+
/**
|
|
67
|
+
* The style declaration block a {@link Track} may carry: *inherited item
|
|
68
|
+
* properties* (resolved `track ?? section ?? page ?? default`, per
|
|
69
|
+
* property — they travel with the track) plus the *positional*
|
|
70
|
+
* {@link TrackStyle.display} (each holder's own children; never
|
|
71
|
+
* inherited).
|
|
72
|
+
*
|
|
73
|
+
* Rules governing every property:
|
|
74
|
+
*
|
|
75
|
+
* - **Declarations are aspirational.** Each surface renders the
|
|
76
|
+
* properties it understands and ignores the rest — inert, never an
|
|
77
|
+
* error.
|
|
78
|
+
* - **Presentation only.** No style property affects queue scope,
|
|
79
|
+
* playback, or navigation: rendering may truncate what is visible, it
|
|
80
|
+
* never changes what plays. (This is why {@link Track.disabled} is NOT
|
|
81
|
+
* here — it carries behavior, so it lives on Track as a content fact.)
|
|
82
|
+
* - **The inheritance boundary**: a handle's block styles the handle; a
|
|
83
|
+
* page's block is inherited by the page's descendants; nothing
|
|
84
|
+
* inherits across resolution.
|
|
85
|
+
*/
|
|
86
|
+
export interface TrackStyle {
|
|
87
|
+
/**
|
|
88
|
+
* How this entity's *children* lay out. The meaning is uniform at
|
|
89
|
+
* every position; only the children differ:
|
|
90
|
+
*
|
|
91
|
+
* - On a {@link Section}: the section's children.
|
|
92
|
+
* - On a resolved page ({@link ResolvedTrack.style}): the declaration
|
|
93
|
+
* for the whole page — a section overrides it for its own children.
|
|
94
|
+
* - On a browsable {@link Track} (the handle): the *advertised*
|
|
95
|
+
* layout of the page it opens. Android Auto decides a page's
|
|
96
|
+
* layout before resolving it, so it is the one reader that acts
|
|
97
|
+
* on the handle's declaration. Declared or it doesn't exist: no
|
|
98
|
+
* value → nothing advertised. The resolved page is the truth.
|
|
99
|
+
* - On a track rendered *playable* (`src` wins the rendering): inert —
|
|
100
|
+
* playables open no page.
|
|
101
|
+
*
|
|
102
|
+
* Never *item*-inherited — each holder speaks only for its own
|
|
103
|
+
* children. Between containers it resolves by scope override, not
|
|
104
|
+
* inheritance: the page declares for its whole scope, a section
|
|
105
|
+
* overrides for its own children.
|
|
106
|
+
*
|
|
107
|
+
* @default 'list'
|
|
108
|
+
*
|
|
109
|
+
* @see https://developer.android.com/training/cars/media/create-media-browser/content-styles
|
|
110
|
+
*/
|
|
111
|
+
display?: StyleDisplay;
|
|
112
|
+
/**
|
|
113
|
+
* Inherited (`track ?? section ?? page`): how this item's artwork is
|
|
114
|
+
* rendered — `'stencil'` tints a monochrome glyph to the surface's
|
|
115
|
+
* light/dark appearance.
|
|
116
|
+
*
|
|
117
|
+
* @default 'original'
|
|
118
|
+
*
|
|
119
|
+
* @platform carplay
|
|
120
|
+
*/
|
|
121
|
+
artworkRendering?: ArtworkRendering;
|
|
122
|
+
/**
|
|
123
|
+
* Inherited (`track ?? section ?? page`): the shape a grid tile's
|
|
124
|
+
* artwork is cropped to — `'circular'` for people, the default
|
|
125
|
+
* `'rounded-rectangle'` for everything else. Shape follows the item
|
|
126
|
+
* wherever it travels: a circular artist stays circular in whatever
|
|
127
|
+
* grid renders it next. Inert where the presentation has no shape
|
|
128
|
+
* (list rows, pre-26 CarPlay, Android Auto).
|
|
129
|
+
*
|
|
130
|
+
* @default 'rounded-rectangle'
|
|
131
|
+
*
|
|
132
|
+
* @platform carplay
|
|
133
|
+
*/
|
|
134
|
+
imageShape?: ImageShape;
|
|
135
|
+
/**
|
|
136
|
+
* Inherited (`track ?? section ?? page`): an SF Symbol name drawn as
|
|
137
|
+
* the item's accessory wherever the current presentation supports one —
|
|
138
|
+
* the trailing edge of a list row, leading the title on an iOS 26 grid
|
|
139
|
+
* tile (placement is the platform's choice per surface). A resolved
|
|
140
|
+
* symbol replaces the derived accessory (the disclosure chevron a
|
|
141
|
+
* browsable row gets); `'none'` clears an inherited value, restoring
|
|
142
|
+
* the derived behavior — inheritance has no other escape, and no SF
|
|
143
|
+
* Symbol is named `none`, so the sentinel is collision-free. Inert off
|
|
144
|
+
* CarPlay.
|
|
145
|
+
*
|
|
146
|
+
* @platform carplay
|
|
147
|
+
*/
|
|
148
|
+
accessorySymbol?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Inherited (`track ?? section ?? page`): the card treatment's tint
|
|
151
|
+
* color (hex, e.g. `'#1e3a8a'`) — a gradient behind the labels, or the
|
|
152
|
+
* color behind them when {@link TrackStyle.cardImage} is
|
|
153
|
+
* `'background'`. Card-prefixed: inert unless the container renders
|
|
154
|
+
* `gridTile: 'card'`.
|
|
155
|
+
*
|
|
156
|
+
* @platform carplay
|
|
157
|
+
*/
|
|
158
|
+
cardTint?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Inherited (`track ?? section ?? page`): how a card tile uses its
|
|
161
|
+
* image — see {@link CardImage}. Uniform via the section value,
|
|
162
|
+
* mixable per card. Inert unless the container renders
|
|
163
|
+
* `gridTile: 'card'`.
|
|
164
|
+
*
|
|
165
|
+
* @default 'normal'
|
|
166
|
+
*
|
|
167
|
+
* @platform carplay
|
|
168
|
+
*/
|
|
169
|
+
cardImage?: CardImage;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* A {@link Section}'s (or resolved page's) style declaration block: the
|
|
173
|
+
* *container* properties below, plus — via `extends` — a section-wide
|
|
174
|
+
* value for every inherited {@link TrackStyle} item property (and the
|
|
175
|
+
* section's own positional `display`).
|
|
176
|
+
*
|
|
177
|
+
* Container properties resolve by scope override, not inheritance: the
|
|
178
|
+
* page declares for its whole scope, a section overrides for its own
|
|
179
|
+
* children (`section ?? page ?? default`) — they never flow to items.
|
|
180
|
+
*/
|
|
181
|
+
export interface SectionStyle extends TrackStyle {
|
|
182
|
+
/**
|
|
183
|
+
* Whether grid tiles wrap to multiple lines. `false` renders exactly
|
|
184
|
+
* one line — the teaser shelf: a preview of a larger collection,
|
|
185
|
+
* typically paired with {@link Section.path} as the "view all" target.
|
|
186
|
+
*
|
|
187
|
+
* Rendered by CarPlay (a single line of tiles). Android Auto has no
|
|
188
|
+
* single-line tile container — its grid wraps, showing more, never
|
|
189
|
+
* less. Phone UIs typically honor `false` as a horizontal scroller.
|
|
190
|
+
*
|
|
191
|
+
* Inert unless {@link TrackStyle.display} is `'grid'`.
|
|
192
|
+
*
|
|
193
|
+
* @default true
|
|
194
|
+
*
|
|
195
|
+
* @platform carplay
|
|
196
|
+
*
|
|
197
|
+
* @see https://developer.apple.com/documentation/carplay/cplistimagerowitem
|
|
198
|
+
*/
|
|
199
|
+
gridWrap?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* The kind of tile this container's grid renders — see
|
|
202
|
+
* {@link GridTile}. A container property (element families are
|
|
203
|
+
* container-homogeneous), resolved by scope override
|
|
204
|
+
* (`section ?? page`), never per item. Inert unless
|
|
205
|
+
* {@link TrackStyle.display} is `'grid'`, and on CarPlay before
|
|
206
|
+
* iOS 26 (where the treatment drops and the layout survives).
|
|
207
|
+
*
|
|
208
|
+
* @default 'plain'
|
|
209
|
+
*
|
|
210
|
+
* @platform carplay
|
|
211
|
+
*/
|
|
212
|
+
gridTile?: GridTile;
|
|
213
|
+
}
|
|
3
214
|
/**
|
|
4
215
|
* Image source for React Native's `<Image>` component.
|
|
5
216
|
* Contains all information needed to load an image, including URL transformation
|
|
@@ -50,74 +261,89 @@ export interface ArtworkVariants {
|
|
|
50
261
|
}
|
|
51
262
|
/** A single artwork URL, or one per appearance. */
|
|
52
263
|
export type TrackArtwork = string | ArtworkVariants;
|
|
53
|
-
|
|
264
|
+
/**
|
|
265
|
+
* A titled, styled group of Tracks within a resolved page — the unit of
|
|
266
|
+
* queue scope. Tapping a playable child queues the section it sits in,
|
|
267
|
+
* identically on every platform and screen width: rendering may truncate
|
|
268
|
+
* what is visible, it never changes what plays.
|
|
269
|
+
*/
|
|
270
|
+
export interface Section {
|
|
271
|
+
/** Header text. Absent = headerless group. */
|
|
272
|
+
title?: string;
|
|
54
273
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
274
|
+
* Presentation, separated from content. Each surface renders the
|
|
275
|
+
* declared layout's nearest supported form; on CarPlay
|
|
276
|
+
* a wrapping grid requires iOS 26+ and renders a list before that,
|
|
277
|
+
* since CarPlay's only earlier tile container truncates at a width the
|
|
278
|
+
* system doesn't report. Use the artwork `resolve` hook to supply
|
|
279
|
+
* fallback art for tile layouts.
|
|
57
280
|
*/
|
|
58
|
-
|
|
59
|
-
/** Navigation path. Tapping this thumbnail navigates to this URL. */
|
|
60
|
-
url?: string;
|
|
281
|
+
style?: SectionStyle;
|
|
61
282
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
283
|
+
* Navigation target for the section's "view all" affordance — the
|
|
284
|
+
* fuller page this section is a teaser for. Absent = a self-contained
|
|
285
|
+
* section: the header is a plain label, not a link.
|
|
286
|
+
*
|
|
287
|
+
* The surface picks the form (ADR 0010), and each carries the copy
|
|
288
|
+
* itself — a `path` never adds words to the section:
|
|
289
|
+
*
|
|
290
|
+
* - **CarPlay** — a tile section's row draws a disclosure chevron and
|
|
291
|
+
* the whole row navigates. A list section renders no affordance:
|
|
292
|
+
* CarPlay has no "see all" idiom for one, and an invented row would
|
|
293
|
+
* spend an item from the template's cap.
|
|
294
|
+
* - **Android Auto** — no header is tappable at any display, so the
|
|
295
|
+
* section gets an appended browsable row, titled by the global
|
|
296
|
+
* `viewMoreTitle` browser option ("View more" by default).
|
|
65
297
|
*/
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
/** Output only — populated by the artwork transform pipeline. */
|
|
70
|
-
readonly artworkSource?: ImageSource;
|
|
71
|
-
/** Title of this item. Shown as the thumbnail caption; used for identification and accessibility. */
|
|
72
|
-
title: string;
|
|
73
|
-
/** Now-playing secondary line when played via `src` (mirrors `Track.artist`). */
|
|
74
|
-
artist?: string;
|
|
75
|
-
/** Now-playing album line when played via `src` (mirrors `Track.album`). */
|
|
76
|
-
album?: string;
|
|
77
|
-
/** Navigation target of the album line when played via `src` (mirrors `Track.albumUrl`). */
|
|
78
|
-
albumUrl?: string;
|
|
79
|
-
/** Live stream indicator when played via `src` (mirrors `Track.live`). */
|
|
80
|
-
live?: boolean;
|
|
81
|
-
/** Per-item media-request override when played via `src` (mirrors `Track.request`). */
|
|
82
|
-
request?: TrackRequest;
|
|
298
|
+
path?: string;
|
|
299
|
+
/** The section's tracks. */
|
|
300
|
+
children: Track[];
|
|
83
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* The one node type of the browse tree — every tab, folder, station,
|
|
304
|
+
* episode, and queue item is a Track. What a Track *is* follows from which
|
|
305
|
+
* address fields it carries: a {@link path} makes it **browsable** (it opens
|
|
306
|
+
* as a page), a {@link src} makes it **playable** (it can be loaded into the
|
|
307
|
+
* player); at least one of the two is required. The remaining fields are
|
|
308
|
+
* display metadata ({@link title}, {@link artist}, {@link artwork}, …) and
|
|
309
|
+
* content state ({@link favorited}, {@link live}, {@link disabled}).
|
|
310
|
+
*/
|
|
84
311
|
export interface Track {
|
|
85
312
|
/**
|
|
86
313
|
* Opaque, stable identifier for this track.
|
|
87
314
|
*
|
|
315
|
+
* A track's **identity** is `id` when set (non-blank), falling back to
|
|
316
|
+
* `src`. That single rule drives every comparison the library makes:
|
|
317
|
+
* favorites matching (`setFavorites`), the CarPlay / Android Auto
|
|
318
|
+
* "now playing" row indicator, section scoping and skip-in-place, and the
|
|
319
|
+
* contextual queue re-expansion. Two tracks refer to the same item iff
|
|
320
|
+
* their identities are equal — so set `id` consistently on every surface,
|
|
321
|
+
* or on none.
|
|
322
|
+
*
|
|
88
323
|
* The library never parses or derives anything from this value — it is
|
|
89
|
-
* round-tripped verbatim through `setQueue`, `getActiveTrack`, the queue,
|
|
90
|
-
* `onActiveTrackChanged`,
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* (absolute vs relative URLs, volatile query params) — otherwise the
|
|
100
|
-
* indicator never matches.
|
|
101
|
-
*
|
|
102
|
-
* It is also handed to the per-track `MediaRequestConfig.resolve` and
|
|
103
|
-
* `ArtworkRequestConfig.resolve` hooks, so requests can be built from a stable
|
|
104
|
-
* id (e.g. supply tracks with only an `id` and synthesise `src` in `resolve`).
|
|
105
|
-
*
|
|
106
|
-
* Optional: consumers whose `url`/`src` strings are already stable across
|
|
107
|
-
* surfaces can ignore it.
|
|
108
|
-
*
|
|
109
|
-
* Note: an Android Auto item selected directly from the browse tree that the
|
|
110
|
-
* consumer never queued is identified only by `url`/`src`, so `id` may be
|
|
111
|
-
* undefined on that specific path.
|
|
324
|
+
* round-tripped verbatim through `setQueue`, `getActiveTrack`, the queue,
|
|
325
|
+
* `onActiveTrackChanged`, and `onFavoriteChanged`, and handed to the
|
|
326
|
+
* per-track `MediaRequestConfig.resolve` / `ArtworkRequestConfig.resolve`
|
|
327
|
+
* hooks so requests can be built from the stable id.
|
|
328
|
+
*
|
|
329
|
+
* Optional: consumers whose `src` strings are identical wherever the same
|
|
330
|
+
* item appears can ignore it — their identity is the `src`. Assign ids when
|
|
331
|
+
* `src` strings for the same item can differ between surfaces (absolute vs
|
|
332
|
+
* relative URLs, volatile query params), or when favorites are stored as an
|
|
333
|
+
* identifier that isn't the playable URL.
|
|
112
334
|
*/
|
|
113
335
|
id?: string;
|
|
114
336
|
/**
|
|
115
337
|
* Navigation path. When present, this track is a container (tab, album, playlist, folder)
|
|
116
338
|
* that can be navigated into to view its contents.
|
|
117
339
|
*
|
|
118
|
-
* At least one of `
|
|
340
|
+
* At least one of `path` or `src` must be defined. When both are set, current
|
|
341
|
+
* surfaces treat the track as playable — `src` wins the rendering, and the
|
|
342
|
+
* browse pipeline replaces a playable track's `path` with its contextual
|
|
343
|
+
* path — so a consumer-supplied `path` on a playable track is not reachable
|
|
344
|
+
* today.
|
|
119
345
|
*/
|
|
120
|
-
|
|
346
|
+
path?: string;
|
|
121
347
|
/**
|
|
122
348
|
* Direct audio source identifier. When present, this track can be played directly.
|
|
123
349
|
*
|
|
@@ -125,7 +351,7 @@ export interface Track {
|
|
|
125
351
|
* any string (file path, custom identifier, etc.) that will be passed to
|
|
126
352
|
* MediaRequestConfig.resolve to transform it into the actual media request.
|
|
127
353
|
*
|
|
128
|
-
* At least one of `
|
|
354
|
+
* At least one of `path` or `src` must be defined.
|
|
129
355
|
*/
|
|
130
356
|
src?: string;
|
|
131
357
|
/**
|
|
@@ -138,7 +364,8 @@ export interface Track {
|
|
|
138
364
|
* Pass an {@link ArtworkVariants} pair to supply genuinely different images
|
|
139
365
|
* per appearance — a logo that changes colour, say. For a monochrome glyph
|
|
140
366
|
* that only needs recolouring, prefer a single URL plus
|
|
141
|
-
* {
|
|
367
|
+
* `style: { artworkRendering: 'stencil' }`, which is one fetch instead
|
|
368
|
+
* of two.
|
|
142
369
|
*
|
|
143
370
|
* **iOS:** supports {@link https://developer.apple.com/sf-symbols/ | SF Symbols}
|
|
144
371
|
* with the `sf:` prefix and optional color params:
|
|
@@ -165,22 +392,6 @@ export interface Track {
|
|
|
165
392
|
readonly artworkSource?: ImageSource;
|
|
166
393
|
/** Per-track media-request override; merged last (request → media → track.request). */
|
|
167
394
|
request?: TrackRequest;
|
|
168
|
-
/**
|
|
169
|
-
* Whether this artwork should be tinted based on CarPlay's current appearance (light/dark mode).
|
|
170
|
-
*
|
|
171
|
-
* When `true`, the artwork is treated as a monochrome icon and tinted:
|
|
172
|
-
* - Light mode: tinted black for visibility on light backgrounds
|
|
173
|
-
* - Dark mode: tinted white for visibility on dark backgrounds
|
|
174
|
-
*
|
|
175
|
-
* This is useful for SVG or PNG icons that need to adapt to CarPlay's light/dark themes.
|
|
176
|
-
* Full-color artwork (album covers, logos) should not use this.
|
|
177
|
-
*
|
|
178
|
-
* **iOS CarPlay only** - Android Auto is dark-only, so content providers should
|
|
179
|
-
* provide appropriately colored icons directly (e.g., white icons).
|
|
180
|
-
*
|
|
181
|
-
* @default false
|
|
182
|
-
*/
|
|
183
|
-
artworkCarPlayTinted?: boolean;
|
|
184
395
|
/** Primary line shown for this item, in both browse lists and now-playing. */
|
|
185
396
|
title: string;
|
|
186
397
|
/**
|
|
@@ -202,9 +413,9 @@ export interface Track {
|
|
|
202
413
|
artist?: string;
|
|
203
414
|
/**
|
|
204
415
|
* Browse path the {@link album} line navigates to (same path namespace as
|
|
205
|
-
* {@link
|
|
416
|
+
* {@link path}). On CarPlay, when the active track has an `albumPath`, its
|
|
206
417
|
* album line on the Now Playing screen becomes tappable and navigates the
|
|
207
|
-
* browse stack there. See also `
|
|
418
|
+
* browse stack there. See also `resolveAlbumPath` in the browser
|
|
208
419
|
* configuration for a dynamic fallback.
|
|
209
420
|
*
|
|
210
421
|
* Requires {@link album} to be set: CarPlay renders the tappable line from
|
|
@@ -212,9 +423,25 @@ export interface Track {
|
|
|
212
423
|
*
|
|
213
424
|
* @platform ios
|
|
214
425
|
*/
|
|
215
|
-
|
|
426
|
+
albumPath?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Album name, shown on now-playing surfaces that have an album slot
|
|
429
|
+
* (CarPlay, Android Auto, Bluetooth metadata — the iOS lock screen has
|
|
430
|
+
* none). With {@link albumPath} set, CarPlay renders it as a tappable
|
|
431
|
+
* line that navigates there.
|
|
432
|
+
*/
|
|
216
433
|
album?: string;
|
|
434
|
+
/**
|
|
435
|
+
* Longer free-form text about the item, passed to the platform's
|
|
436
|
+
* description metadata slot where one exists. Not shown on browse rows
|
|
437
|
+
* (those render {@link title} / {@link subtitle}) or the lock screen.
|
|
438
|
+
*/
|
|
217
439
|
description?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Genre name, passed to the platform's genre metadata slot where one
|
|
442
|
+
* exists. Catalog metadata only — the library never matches search or
|
|
443
|
+
* browse against it.
|
|
444
|
+
*/
|
|
218
445
|
genre?: string;
|
|
219
446
|
/**
|
|
220
447
|
* Duration in seconds, as catalog metadata for app UI (e.g. an episode
|
|
@@ -223,67 +450,75 @@ export interface Track {
|
|
|
223
450
|
*/
|
|
224
451
|
duration?: number;
|
|
225
452
|
/**
|
|
226
|
-
*
|
|
227
|
-
* -
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* (e.g., `android.resource://com.myapp/drawable/ic_folder`), the library
|
|
232
|
-
* automatically uses 'category' styling which adds margins around the icon
|
|
233
|
-
* and enables system tinting for vector drawables.
|
|
234
|
-
*
|
|
235
|
-
* @see https://developer.android.com/training/cars/media#default-content-style
|
|
453
|
+
* The track's style declaration block: inherited item properties (a
|
|
454
|
+
* per-item override of section/page values — they travel with the
|
|
455
|
+
* track), plus the positional {@link TrackStyle.display} — on a
|
|
456
|
+
* browsable track, the advertised layout of the page it opens, read
|
|
457
|
+
* by Android Auto, which picks a page's layout before resolving it.
|
|
236
458
|
*/
|
|
237
459
|
style?: TrackStyle;
|
|
238
460
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
461
|
+
* Unavailable — a content-state fact beside `favorited` and `live`,
|
|
462
|
+
* with full behavioral weight (content facts may carry behavior; style
|
|
463
|
+
* never does): a disabled track never plays — tap refused, queue
|
|
464
|
+
* expansion excludes it, voice search won't match it.
|
|
465
|
+
*
|
|
466
|
+
* Rendering ladder, never a trap: **grayed + inert** where the surface
|
|
467
|
+
* can draw it (CarPlay) → **hidden** where it can't (Android Auto) —
|
|
468
|
+
* never a normal-looking dead control. Hiding is behavior-safe because
|
|
469
|
+
* the track is inert everywhere regardless; the cost is losing the
|
|
470
|
+
* "Available at 9 PM" tease on surfaces that hide, so put the reason
|
|
471
|
+
* in the title for the ones that gray. Applied at page (re-)serve,
|
|
472
|
+
* like style.
|
|
243
473
|
*
|
|
244
|
-
*
|
|
245
|
-
* Android Auto reads the extras at that point to determine how to display
|
|
246
|
-
* the folder's contents when navigated into.
|
|
474
|
+
* @default false
|
|
247
475
|
*/
|
|
248
|
-
|
|
476
|
+
disabled?: boolean;
|
|
249
477
|
/**
|
|
250
478
|
* Whether this track is favorited. When the `favorite` capability is enabled,
|
|
251
479
|
* displays a filled/empty heart icon in media controllers (notification, Android Auto).
|
|
252
480
|
*/
|
|
253
481
|
favorited?: boolean;
|
|
254
482
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*/
|
|
259
|
-
groupTitle?: string;
|
|
260
|
-
/**
|
|
261
|
-
* Whether this track is a live stream. When true, displays a "live" indicator
|
|
262
|
-
* in iOS now playing interfaces.
|
|
263
|
-
*/
|
|
264
|
-
live?: boolean;
|
|
265
|
-
/**
|
|
266
|
-
* When present, renders this track as a horizontal row of tappable artwork
|
|
267
|
-
* thumbnails instead of a standard list item.
|
|
268
|
-
*
|
|
269
|
-
* - Track.title → row header text
|
|
270
|
-
* - Track.url → navigated when header is tapped (optional)
|
|
271
|
-
* - Each ImageRowItem → one thumbnail in the horizontal row; a thumbnail
|
|
272
|
-
* with `src` plays immediately on tap, otherwise its `url` is navigated
|
|
483
|
+
* Declares this track a live broadcast rather than a file. The players
|
|
484
|
+
* detect *transport* liveness (sliding windows, buffering) themselves;
|
|
485
|
+
* this declaration drives the semantic decisions they can't infer:
|
|
273
486
|
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
487
|
+
* - **End of stream** (iOS): a live track "ending" is judged a dropped
|
|
488
|
+
* broadcast and recovered by rejoining the edge, never a queue advance.
|
|
489
|
+
* - **Stall recovery** (iOS): a live track that runs dry reconnects at
|
|
490
|
+
* the edge; a non-live one resumes its existing connection.
|
|
491
|
+
* - **`seekToLiveEdge()`** (all platforms): the call only acts on a
|
|
492
|
+
* track declared live — without the declaration it is a no-op.
|
|
493
|
+
* - **Persistence** (iOS): no position is stored, so a cold-start resume
|
|
494
|
+
* rejoins the current broadcast instead of seeking a stale timestamp.
|
|
495
|
+
* - **Now-playing** (iOS): the live indicator and live-style
|
|
496
|
+
* (non-scrubbing) progress UI.
|
|
277
497
|
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
498
|
+
* The iOS-heavy list is deliberate, not a gap: on Android, ExoPlayer's
|
|
499
|
+
* own classification already covers these — a dropped live connection
|
|
500
|
+
* surfaces as a load error (never end-of-stream), and persistence keys
|
|
501
|
+
* off its detected liveness — so the declaration's only Android reader
|
|
502
|
+
* is the `seekToLiveEdge()` gate. Android Auto has no live badge.
|
|
283
503
|
*
|
|
284
|
-
*
|
|
504
|
+
* Omitting it never breaks playback — it silently breaks these judgment
|
|
505
|
+
* calls. Declare it on every live track.
|
|
285
506
|
*/
|
|
286
|
-
|
|
507
|
+
live?: boolean;
|
|
508
|
+
/**
|
|
509
|
+
* Byte encoding of this track's ICY `StreamTitle` when it is not UTF-8, as
|
|
510
|
+
* an IANA label (`'windows-1251'`, `'windows-874'`, …). Some Shoutcast /
|
|
511
|
+
* Icecast stations send titles in a legacy code page; ICY declares no
|
|
512
|
+
* encoding, so the player's UTF-8 decode fails and falls back to Latin-1,
|
|
513
|
+
* showing mojibake. With this set, a title that came out Latin-1 shaped
|
|
514
|
+
* (every char at or below U+00FF, some at or above U+0080) is re-decoded
|
|
515
|
+
* through ISO-8859-1 with the given charset; this also repairs stations
|
|
516
|
+
* that UTF-8 encoded their legacy bytes. A title already in another script
|
|
517
|
+
* or pure ASCII is left alone. Applies to ICY only: ID3 and HLS timed
|
|
518
|
+
* metadata declare their own encoding and are never touched. A label the
|
|
519
|
+
* platform cannot decode with is ignored.
|
|
520
|
+
*/
|
|
521
|
+
icyCharset?: string;
|
|
287
522
|
}
|
|
288
523
|
/**
|
|
289
524
|
* A Track that has been resolved with its children through browsing.
|
|
@@ -295,21 +530,40 @@ export interface Track {
|
|
|
295
530
|
* ```ts
|
|
296
531
|
* // navigate() is fire-and-forget (returns void); read the resolved page
|
|
297
532
|
* // from getContent() / useContent() / onContentChanged.
|
|
298
|
-
* navigate('albums/abbey-road');
|
|
533
|
+
* navigate('/albums/abbey-road');
|
|
299
534
|
* const resolved = getContent();
|
|
300
|
-
* console.log(resolved?.
|
|
535
|
+
* console.log(resolved?.path); // "/albums/abbey-road"
|
|
301
536
|
* console.log(resolved?.title); // "Abbey Road"
|
|
302
|
-
* console.log(resolved?.
|
|
537
|
+
* console.log(resolved?.sections); // the album's tracks, as sections
|
|
303
538
|
* ```
|
|
304
539
|
*/
|
|
305
540
|
export interface ResolvedTrack extends Track {
|
|
306
541
|
/**
|
|
307
|
-
*
|
|
542
|
+
* Browse path of this resolved track. Always present since you navigated to this location.
|
|
543
|
+
*/
|
|
544
|
+
path: string;
|
|
545
|
+
/**
|
|
546
|
+
* A page is a Track that is also the container of its sections, so its
|
|
547
|
+
* block widens to {@link SectionStyle}: the declaration for the whole
|
|
548
|
+
* page. Item properties set here are inherited by every item on the
|
|
549
|
+
* page unless a section or track declares its own; the container
|
|
550
|
+
* property (`gridWrap`) and the positional `display` are the page-wide
|
|
551
|
+
* values a section overrides for its own children.
|
|
552
|
+
*/
|
|
553
|
+
style?: SectionStyle;
|
|
554
|
+
/**
|
|
555
|
+
* The page's sections — the canonical resolved shape. Every resolved page
|
|
556
|
+
* with content carries `sections`; a page authored with plain `children`
|
|
557
|
+
* resolves to a single untitled section.
|
|
308
558
|
*/
|
|
309
|
-
|
|
559
|
+
sections?: Section[];
|
|
310
560
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
561
|
+
* Authoring sugar for a flat page: equivalent to declaring one untitled,
|
|
562
|
+
* style-less section holding these tracks (which therefore takes the
|
|
563
|
+
* page block's scope-wide values, like any undeclared section). Accepted
|
|
564
|
+
* anywhere a page is authored (static routes, browse callbacks, JSON
|
|
565
|
+
* payloads); never populated on a *resolved* page — read `sections`
|
|
566
|
+
* instead.
|
|
313
567
|
*/
|
|
314
568
|
children?: Track[];
|
|
315
569
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-nodes.d.ts","sourceRoot":"","sources":["../../../../src/types/browser-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE1E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"browser-nodes.d.ts","sourceRoot":"","sources":["../../../../src/types/browser-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE1E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAA;AAE1C;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,mBAAmB,CAAA;AAEzD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IAEtB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IAEnC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAA;CACb;AAOD,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,eAAe,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4BAA4B;IAC5B,QAAQ,EAAE,KAAK,EAAE,CAAA;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,KAAK;IACpB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IAEtB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,WAAW,CAAA;IAEpC,uFAAuF;IACvF,OAAO,CAAC,EAAE,YAAY,CAAA;IAGtB,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,UAAU,CAAA;IAElB;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,YAAY,CAAA;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IAEpB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAA;IAElB;;;;;;;;;;;;OAYG;IACH,qBAAqB,CAAC,EAAE,6BAA6B,CAAA;CACtD"}
|