react-native-queue-player 1.1.2 → 2.0.0
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/QueuePlayer.podspec +14 -9
- package/README.md +3 -3
- package/android/build.gradle +7 -0
- package/android/consumer-rules.pro +72 -3
- package/android/src/main/cpp/airplay2_control.c +4 -4
- package/android/src/main/cpp/airplay2_control.h +4 -4
- package/android/src/main/cpp/airplay2_jni.cpp +26 -22
- package/android/src/main/cpp/airplay2_pair.c +7 -7
- package/android/src/main/cpp/airplay2_pair.h +2 -2
- package/android/src/main/cpp/airplay2_rtsp.c +8 -8
- package/android/src/main/cpp/airplay2_session.c +2 -2
- package/android/src/main/cpp/airplay_jni.cpp +20 -72
- package/android/src/main/java/com/margelo/nitro/queueplayer/AirPlayEngine.kt +7 -16
- package/android/src/main/java/com/margelo/nitro/queueplayer/CacheMimeTypes.kt +1 -1
- package/android/src/main/java/com/margelo/nitro/queueplayer/CastManager.kt +2 -14
- package/android/src/main/java/com/margelo/nitro/queueplayer/CellularTransportMonitor.kt +77 -0
- package/android/src/main/java/com/margelo/nitro/queueplayer/CrossfadeEngine.kt +187 -52
- package/android/src/main/java/com/margelo/nitro/queueplayer/Equalizer.kt +27 -7
- package/android/src/main/java/com/margelo/nitro/queueplayer/EqualizerEngine.kt +33 -12
- package/android/src/main/java/com/margelo/nitro/queueplayer/EqualizerLegacyEngine.kt +31 -8
- package/android/src/main/java/com/margelo/nitro/queueplayer/FFTProcessorTee.kt +45 -30
- package/android/src/main/java/com/margelo/nitro/queueplayer/FifoCacheEvictor.kt +111 -15
- package/android/src/main/java/com/margelo/nitro/queueplayer/GaplessEngine.kt +60 -33
- package/android/src/main/java/com/margelo/nitro/queueplayer/HeadlessJsMediaService.kt +1 -1
- package/android/src/main/java/com/margelo/nitro/queueplayer/IEqualizerEngine.kt +3 -1
- package/android/src/main/java/com/margelo/nitro/queueplayer/LookaheadCache.kt +103 -29
- package/android/src/main/java/com/margelo/nitro/queueplayer/LookaheadCacheWriter.kt +77 -29
- package/android/src/main/java/com/margelo/nitro/queueplayer/MediaItemBuilder.kt +6 -6
- package/android/src/main/java/com/margelo/nitro/queueplayer/NowPlayingFormatExtractor.kt +48 -1
- package/android/src/main/java/com/margelo/nitro/queueplayer/PitchCorrection.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/queueplayer/PlaybackEngine.kt +71 -76
- package/android/src/main/java/com/margelo/nitro/queueplayer/PlaybackErrorMapping.kt +3 -3
- package/android/src/main/java/com/margelo/nitro/queueplayer/PlaybackModeStateMachine.kt +2 -2
- package/android/src/main/java/com/margelo/nitro/queueplayer/PlaybackService.kt +68 -46
- package/android/src/main/java/com/margelo/nitro/queueplayer/PlaybackServiceCallback.kt +6 -5
- package/android/src/main/java/com/margelo/nitro/queueplayer/QueueMutationArithmetic.kt +5 -6
- package/android/src/main/java/com/margelo/nitro/queueplayer/QueueSkipArithmetic.kt +11 -8
- package/android/src/main/java/com/margelo/nitro/queueplayer/ReplayGainAudioProcessor.kt +26 -6
- package/android/src/main/java/com/margelo/nitro/queueplayer/ReplayGainData.kt +22 -3
- package/android/src/main/java/com/margelo/nitro/queueplayer/ReplayGainExtractor.kt +38 -12
- package/android/src/main/java/com/margelo/nitro/queueplayer/ReplayGainGain.kt +17 -13
- package/android/src/main/java/com/margelo/nitro/queueplayer/SuppliedReplayGain.kt +66 -0
- package/android/src/main/java/com/margelo/nitro/queueplayer/TrackPlayer.kt +870 -278
- package/android/src/main/java/com/margelo/nitro/queueplayer/Visualizer.kt +4 -8
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/CastBackend.kt +4 -3
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/CastEventBridge.kt +1 -10
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/CastSession.kt +17 -3
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/CastTransportRouter.kt +19 -0
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/RemotePlaybackStateMapping.kt +18 -0
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlay2JNI.kt +0 -2
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlay2Session.kt +23 -12
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlayBackend.kt +16 -9
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlayMetadataSync.kt +58 -21
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlayRenderersFactory.kt +6 -14
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlaySession.kt +26 -14
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirplayJNI.kt +1 -13
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/MetadataSyncTarget.kt +20 -0
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/MulticastLockHolder.kt +1 -1
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/chromecast/ChromecastBackend.kt +3 -3
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/chromecast/ChromecastSession.kt +73 -13
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/http/LocalMediaServer.kt +11 -35
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/http/MediaServerHandle.kt +0 -5
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/http/MediaTokenRegistry.kt +0 -6
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/net/LocalAddressMonitor.kt +32 -33
- package/android/src/test/java/androidx/media3/session/{MediaSessionControllerRequestTestSeam.kt → MediaSessionControllerRequestTestSupport.kt} +1 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/AvrcpMetadataTest.kt +12 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/CrossfadeEngineFocusLossTest.kt +115 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/CrossfadeEngineLifecycleTest.kt +45 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/EngineEndSignalOrderTest.kt +70 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/EqualizerEngineTest.kt +23 -12
- package/android/src/test/java/com/margelo/nitro/queueplayer/EqualizerKtTest.kt +0 -6
- package/android/src/test/java/com/margelo/nitro/queueplayer/EqualizerLegacyEngineTest.kt +43 -15
- package/android/src/test/java/com/margelo/nitro/queueplayer/FFTProcessorTeeTest.kt +15 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/FifoCacheEvictorTest.kt +135 -4
- package/android/src/test/java/com/margelo/nitro/queueplayer/GaplessEngineLifecycleTest.kt +1 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/GaplessEngineReplayGainTest.kt +36 -2
- package/android/src/test/java/com/margelo/nitro/queueplayer/LookaheadCacheTest.kt +24 -18
- package/android/src/test/java/com/margelo/nitro/queueplayer/LookaheadCacheWriterCancelTest.kt +85 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/LookaheadCacheWriterTest.kt +112 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/MediaItemBuilderTest.kt +5 -3
- package/android/src/test/java/com/margelo/nitro/queueplayer/NowPlayingFormatExtractorTest.kt +45 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/PitchAwareAudioProcessorChainTest.kt +1 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/PlaybackServiceCallbackSearchTest.kt +47 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/PlaybackServiceCallbackTest.kt +53 -29
- package/android/src/test/java/com/margelo/nitro/queueplayer/PlaybackServiceLifecycleTest.kt +8 -8
- package/android/src/test/java/com/margelo/nitro/queueplayer/QueueSkipArithmeticTest.kt +33 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/ReplayGainAudioProcessorTest.kt +128 -5
- package/android/src/test/java/com/margelo/nitro/queueplayer/ReplayGainExtractorTest.kt +209 -14
- package/android/src/test/java/com/margelo/nitro/queueplayer/ReplayGainGainTest.kt +150 -10
- package/android/src/test/java/com/margelo/nitro/queueplayer/ReplayGainMergeTest.kt +258 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/RobolectricServiceBindHelper.kt +8 -4
- package/android/src/test/java/com/margelo/nitro/queueplayer/SessionCommandForwardingPlayerTest.kt +2 -2
- package/android/src/test/java/com/margelo/nitro/queueplayer/ShadowDynamicsProcessingRejectingEnable.kt +19 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/ShadowEqualizer.kt +68 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/ShadowEqualizerRejectingBandWrites.kt +27 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/SuppliedReplayGainTest.kt +61 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerAirPlayMetadataWiringTest.kt +4 -4
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerAudioFocusTest.kt +1 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerCastCommandRoutingTest.kt +163 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerCastStateTest.kt +123 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerEventsTest.kt +88 -38
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerLifecycleTest.kt +205 -27
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerLookaheadConfigTest.kt +277 -38
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerMutationTest.kt +5 -3
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerProgressThrottleTest.kt +2 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerQueueChangeTest.kt +85 -3
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerQueueTest.kt +11 -7
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerReadersTest.kt +2 -1
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerSkipCapabilityTest.kt +90 -4
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerSkipTest.kt +8 -26
- package/android/src/test/java/com/margelo/nitro/queueplayer/TrackPlayerTransportTest.kt +3 -3
- package/android/src/test/java/com/margelo/nitro/queueplayer/VisualizerKtTest.kt +0 -4
- package/android/src/test/java/com/margelo/nitro/queueplayer/cast/FakeRemotePlayer.kt +27 -11
- package/android/src/test/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlayMetadataSyncTest.kt +303 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/cast/net/LocalAddressMonitorTest.kt +173 -0
- package/android/src/test/java/com/margelo/nitro/queueplayer/cast/net/ShadowConnectivityManagerRecordingRequests.kt +27 -0
- package/app.plugin.js +17 -1
- package/ios/AVPlayerItemQueueItemId.swift +26 -12
- package/ios/AVQueueBuilder.swift +120 -85
- package/ios/ArtworkLoader.swift +0 -7
- package/ios/ArtworkResolver.swift +22 -4
- package/ios/AssetReplayGainReader.swift +118 -0
- package/ios/AudioSession.swift +67 -16
- package/ios/AudioTapProvider.swift +284 -149
- package/ios/CarPlayBridge.swift +0 -12
- package/ios/CarPlayCoordinator.swift +18 -2
- package/ios/CarPlaySceneDelegate.swift +2 -2
- package/ios/Cast/AirPlayRouteState.swift +9 -8
- package/ios/Cast/Chromecast/ChromecastSession.swift +90 -11
- package/ios/Cast/Core/CastEventBridge.swift +66 -26
- package/ios/Cast/Core/CastNowPlayingController.swift +38 -16
- package/ios/Cast/Core/CastSession.swift +11 -0
- package/ios/Cast/Core/CastTransportRouter.swift +21 -9
- package/ios/Cast/Core/LocalMediaServer.swift +41 -52
- package/ios/Cast/Core/LocalNetworkPermissionProbe.swift +32 -11
- package/ios/Cast/Core/MediaServerHandle.swift +0 -4
- package/ios/Cast/Core/MediaTokenRegistry.swift +0 -6
- package/ios/CastManager.swift +1 -1
- package/ios/CrossfadeEngine.swift +660 -226
- package/ios/EQTap.swift +20 -17
- package/ios/Equalizer.swift +1 -1
- package/ios/FLACStreamInfo.swift +65 -0
- package/ios/GaplessEngine.swift +57 -30
- package/ios/InputGuards.swift +35 -5
- package/ios/LookaheadCache.swift +202 -58
- package/ios/LookaheadCachePrefetcher.swift +48 -36
- package/ios/MediaServer/MediaHTTPConnection.swift +691 -0
- package/ios/NetworkRecoveryPolicy.swift +32 -0
- package/ios/NowPlayingFormatExtractor.swift +25 -18
- package/ios/NowPlayingInfo.swift +84 -48
- package/ios/OutputRouteMonitor.swift +16 -3
- package/ios/PendingBrowseRequests.swift +1 -1
- package/ios/PlaceholderArtwork.swift +9 -5
- package/ios/PlaybackEngine.swift +165 -76
- package/ios/PlaybackErrorMapping.swift +3 -3
- package/ios/PlaybackModeStateMachine.swift +2 -2
- package/ios/PlaybackNetworkMonitor.swift +73 -0
- package/ios/PlayerStateDerivation.swift +6 -6
- package/ios/QueueMutationArithmetic.swift +25 -0
- package/ios/QueueSkipArithmetic.swift +5 -3
- package/ios/QueueWindowArithmetic.swift +152 -0
- package/ios/ReadThroughServer.swift +283 -0
- package/ios/RemoteCommands.swift +44 -4
- package/ios/ReplayGainData.swift +22 -3
- package/ios/ReplayGainExtractor.swift +70 -27
- package/ios/Siri/VoiceDonation.swift +14 -9
- package/ios/StreamingBitrateProbe.swift +22 -68
- package/ios/SuppliedReplayGain.swift +83 -0
- package/ios/Tests/AVQueueBuilderTests.swift +158 -221
- package/ios/Tests/ActiveItemEngineStub.swift +44 -0
- package/ios/Tests/AssetReplayGainReaderTests.swift +228 -0
- package/ios/Tests/AudioTapProviderDispatchTargetTests.swift +158 -0
- package/ios/Tests/AudioTapProviderReplayGainTests.swift +122 -10
- package/ios/Tests/BitrateReresolveBudgetTests.swift +71 -0
- package/ios/Tests/CastMediaItemTranslationTests.swift +72 -0
- package/ios/Tests/CastNowPlayingControllerTests.swift +5 -0
- package/ios/Tests/CrossfadeAdvanceWithoutFadeTests.swift +120 -0
- package/ios/Tests/CrossfadeEngineIncomingMixTests.swift +122 -0
- package/ios/Tests/CrossfadeEngineTests.swift +164 -0
- package/ios/Tests/CrossfadeMixReapplyTests.swift +66 -0
- package/ios/Tests/CrossfadePlaybackIntentTests.swift +81 -0
- package/ios/Tests/EngineSwapTests.swift +91 -0
- package/ios/Tests/EqualizerAudioMixProviderTests.swift +46 -0
- package/ios/Tests/EqualizerHybridTests.swift +5 -2
- package/ios/Tests/FLACStreamInfoTests.swift +88 -0
- package/ios/Tests/GaplessEngineLifecycleTests.swift +4 -4
- package/ios/Tests/InputGuardsTests.swift +41 -0
- package/ios/Tests/InterruptionIntentTests.swift +77 -0
- package/ios/Tests/LookaheadCacheCellularAccessTests.swift +185 -0
- package/ios/Tests/LookaheadCachePrefetcherTests.swift +53 -30
- package/ios/Tests/LookaheadCacheRuntimeConfigTests.swift +160 -1
- package/ios/Tests/LookaheadCacheTests.swift +44 -18
- package/ios/Tests/MediaHTTPConnectionTests.swift +79 -0
- package/ios/Tests/MutationDeferralTests.swift +220 -0
- package/ios/Tests/NowPlayingInfoTests.swift +86 -99
- package/ios/Tests/NowPlayingSnapshotTests.swift +127 -0
- package/ios/Tests/OriginRestartStitcherTests.swift +60 -0
- package/ios/Tests/PlaybackNetworkMonitorTests.swift +95 -0
- package/ios/Tests/PlaybackStateRouterTests.swift +1 -0
- package/ios/Tests/PlayerFixtures.swift +48 -0
- package/ios/Tests/PlayerStateDerivationTests.swift +10 -10
- package/ios/Tests/QueueMutationGenerationTests.swift +141 -0
- package/ios/Tests/QueueRebuildPrefixTests.swift +317 -0
- package/ios/Tests/QueueStateTests.swift +3 -1
- package/ios/Tests/QueueWindowArithmeticTests.swift +56 -0
- package/ios/Tests/QueueWindowSliceTests.swift +162 -0
- package/ios/Tests/ReadThroughRoutingLifecycleTests.swift +63 -0
- package/ios/Tests/ReadThroughServerTests.swift +345 -0
- package/ios/Tests/RemoteCommandsTests.swift +28 -0
- package/ios/Tests/ReplayGainExtractorTests.swift +216 -6
- package/ios/Tests/ReplayGainMergeTests.swift +230 -0
- package/ios/Tests/RetryRecoveryTests.swift +303 -0
- package/ios/Tests/SkipCapabilityTests.swift +233 -8
- package/ios/Tests/SkipIndexTests.swift +32 -2
- package/ios/Tests/SleepTimerPauseIntentTests.swift +43 -0
- package/ios/Tests/StallRecoveryTests.swift +97 -0
- package/ios/Tests/StreamingBitrateProbeTests.swift +17 -20
- package/ios/Tests/TopUpWindowGateTests.swift +394 -0
- package/ios/Tests/TrackPlayer+TestHops.swift +14 -0
- package/ios/Tests/TrackPlayerCallOrderTests.swift +93 -0
- package/ios/Tests/TrackPlayerCastStateTests.swift +78 -0
- package/ios/Tests/TrackPlayerConfigureTeardownTests.swift +86 -0
- package/ios/Tests/TrackPlayerEndVerdictTests.swift +165 -0
- package/ios/Tests/TrackPlayerSeekTests.swift +137 -0
- package/ios/Tests/TrackPlayerThreadingTests.swift +127 -0
- package/ios/Tests/TrackSourceClassifierTests.swift +33 -7
- package/ios/Tests/VoiceVocabularyOptInTests.swift +38 -0
- package/ios/TrackPlayer+Automotive.swift +101 -0
- package/ios/TrackPlayer+Cache.swift +232 -0
- package/ios/TrackPlayer+Config.swift +291 -0
- package/ios/TrackPlayer+EngineDelegate.swift +209 -0
- package/ios/TrackPlayer+EventsAPI.swift +111 -0
- package/ios/TrackPlayer+EventsDispatch.swift +968 -0
- package/ios/TrackPlayer+EventsWiring.swift +173 -0
- package/ios/TrackPlayer+Lifecycle.swift +930 -0
- package/ios/TrackPlayer+NowPlayingFormat.swift +258 -0
- package/ios/TrackPlayer+Queue.swift +940 -0
- package/ios/TrackPlayer+Recovery.swift +196 -0
- package/ios/TrackPlayer+Skip.swift +455 -0
- package/ios/TrackPlayer+SleepTimer.swift +175 -0
- package/ios/TrackPlayer+State.swift +108 -0
- package/ios/TrackPlayer+Threading.swift +135 -0
- package/ios/TrackPlayer+Transport.swift +267 -0
- package/ios/TrackPlayer+Window.swift +195 -0
- package/ios/TrackPlayer.swift +305 -4610
- package/ios/Visualizer.swift +6 -5
- package/ios/tests-harness/Podfile +1 -1
- package/ios/tests-harness/TestHost.xcodeproj/project.pbxproj +19 -11
- package/ios/tests-harness/scripts/seed-xcodeproj.rb +2 -2
- package/lib/module/hooks/useActiveTrack.js +29 -22
- package/lib/module/hooks/useActiveTrack.js.map +1 -1
- package/lib/module/hooks/useCast.js +8 -26
- package/lib/module/hooks/useCast.js.map +1 -1
- package/lib/module/hooks/useEqualizer.js +19 -12
- package/lib/module/hooks/useEqualizer.js.map +1 -1
- package/lib/module/hooks/useLookaheadCache.js +3 -7
- package/lib/module/hooks/useLookaheadCache.js.map +1 -1
- package/lib/module/hooks/useQueue.js +66 -19
- package/lib/module/hooks/useQueue.js.map +1 -1
- package/lib/module/index.js +6 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/queueDelta.js +41 -0
- package/lib/module/queueDelta.js.map +1 -0
- package/lib/module/types.js +28 -5
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/TrackPlayer.nitro.d.ts +53 -28
- package/lib/typescript/TrackPlayer.nitro.d.ts.map +1 -1
- package/lib/typescript/hooks/useActiveTrack.d.ts +5 -7
- package/lib/typescript/hooks/useActiveTrack.d.ts.map +1 -1
- package/lib/typescript/hooks/useCast.d.ts +6 -1
- package/lib/typescript/hooks/useCast.d.ts.map +1 -1
- package/lib/typescript/hooks/useEqualizer.d.ts +2 -1
- package/lib/typescript/hooks/useEqualizer.d.ts.map +1 -1
- package/lib/typescript/hooks/useLookaheadCache.d.ts.map +1 -1
- package/lib/typescript/hooks/useQueue.d.ts +4 -4
- package/lib/typescript/hooks/useQueue.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/queueDelta.d.ts +10 -0
- package/lib/typescript/queueDelta.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +168 -12
- package/lib/typescript/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_QueueChangeDelta_double_QueueChangeReason.hpp +85 -0
- package/nitrogen/generated/android/c++/JHybridTrackPlayerSpec.cpp +45 -19
- package/nitrogen/generated/android/c++/JHybridTrackPlayerSpec.hpp +3 -3
- package/nitrogen/generated/android/c++/JLookaheadCacheConfig.hpp +8 -4
- package/nitrogen/generated/android/c++/JPlayerConfig.hpp +5 -1
- package/nitrogen/generated/android/c++/JQueueChangeDelta.hpp +128 -0
- package/nitrogen/generated/android/c++/JTrackItem.hpp +19 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__vector_BrowseItem______std__string.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__vector_TrackItem______MediaSearchRequest.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__vector_TrackItem______std__string.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_AudioRoute.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_BufferState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_CacheStatus.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_CastDiscoveryState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_CastLocalNetworkPermissionEvent.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_CastRoute.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_CastSessionDiedEvent.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_PlaybackError.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_PlayerProgress.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_PlayerState_StateChangeReason.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/{Func_void_std__vector_TrackItem__double_QueueChangeReason.kt → Func_void_QueueChangeDelta_double_QueueChangeReason.kt} +14 -16
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_ServiceReadyReason.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_SkipCapability.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_SleepTimerState.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_VisualizerErrorReason.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_VisualizerFrame.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_bool.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_double_double.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_std__optional_TrackItem__double_TrackChangeReason_std__optional_double_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_std__optional_std__variant_nitro__NullType__NowPlayingFormat__.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_std__vector_CastReceiver_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/Func_void_std__vector_EqualizerBand_.kt +0 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/HybridCastManagerSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/HybridEqualizerSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/HybridTrackPlayerSpec.kt +6 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/HybridVisualizerSpec.kt +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/LookaheadCacheConfig.kt +9 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/PlayerConfig.kt +7 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/QueueChangeDelta.kt +86 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/queueplayer/TrackItem.kt +24 -4
- package/nitrogen/generated/android/queueplayerOnLoad.cpp +2 -2
- package/nitrogen/generated/ios/QueuePlayer-Swift-Cxx-Bridge.cpp +16 -16
- package/nitrogen/generated/ios/QueuePlayer-Swift-Cxx-Bridge.hpp +80 -65
- package/nitrogen/generated/ios/QueuePlayer-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridTrackPlayerSpecSwift.hpp +6 -3
- package/nitrogen/generated/ios/swift/Func_void_CacheStatus.swift +5 -5
- package/nitrogen/generated/ios/swift/Func_void_QueueChangeDelta_double_QueueChangeReason.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridTrackPlayerSpec.swift +3 -3
- package/nitrogen/generated/ios/swift/HybridTrackPlayerSpec_cxx.swift +32 -24
- package/nitrogen/generated/ios/swift/LookaheadCacheConfig.swift +20 -2
- package/nitrogen/generated/ios/swift/PlayerConfig.swift +19 -1
- package/nitrogen/generated/ios/swift/QueueChangeDelta.swift +82 -0
- package/nitrogen/generated/ios/swift/TrackItem.swift +73 -1
- package/nitrogen/generated/shared/c++/HybridTrackPlayerSpec.hpp +6 -3
- package/nitrogen/generated/shared/c++/LookaheadCacheConfig.hpp +7 -3
- package/nitrogen/generated/shared/c++/PlayerConfig.hpp +5 -1
- package/nitrogen/generated/shared/c++/QueueChangeDelta.hpp +113 -0
- package/nitrogen/generated/shared/c++/TrackItem.hpp +18 -2
- package/package.json +8 -8
- package/src/TrackPlayer.nitro.ts +53 -27
- package/src/hooks/useActiveTrack.ts +29 -22
- package/src/hooks/useCast.ts +14 -15
- package/src/hooks/useEqualizer.ts +19 -12
- package/src/hooks/useLookaheadCache.ts +3 -7
- package/src/hooks/useQueue.ts +66 -17
- package/src/index.ts +13 -3
- package/src/queueDelta.ts +41 -0
- package/src/types.ts +169 -12
- package/android/src/main/java/com/margelo/nitro/queueplayer/PendingIntentBuffer.kt +0 -82
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/airplay/AirPlay2MetadataSync.kt +0 -189
- package/android/src/main/java/com/margelo/nitro/queueplayer/cast/http/LocalMediaServerLifecycle.kt +0 -15
- package/android/src/test/java/com/margelo/nitro/queueplayer/PendingIntentBufferTest.kt +0 -192
- package/android/src/test/java/com/margelo/nitro/queueplayer/PlaybackEngineInterfaceTest.kt +0 -135
- package/android/src/test/java/com/margelo/nitro/queueplayer/SmokeTest.kt +0 -27
- package/ios/Cast/Core/LocalAddressMonitor.swift +0 -110
- package/ios/Cast/Core/MediaHTTPConnection.swift +0 -349
- package/ios/MetadataReader.swift +0 -555
- package/ios/Tests/CrossfadeEngineStubTests.swift +0 -43
- package/ios/Tests/MetadataReaderTests.swift +0 -603
- package/ios/Tests/PlaybackEngineProtocolTests.swift +0 -92
- package/ios/Tests/VoiceDonationTests.swift +0 -26
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_TrackItem__double_QueueChangeReason.hpp +0 -101
- package/nitrogen/generated/ios/swift/Func_void_std__vector_TrackItem__double_QueueChangeReason.swift +0 -46
- /package/ios/{Cast/Core → MediaServer}/MimeTypes.swift +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Rebuild the queue from the previous copy plus one change.
|
|
5
|
+
*
|
|
6
|
+
* Exported from the package root as the reference for what a consumer must do
|
|
7
|
+
* with a delta; `useQueue` applies it too. The shapes it reads are documented
|
|
8
|
+
* on [QueueChangeDelta].
|
|
9
|
+
*/
|
|
10
|
+
export function applyQueueDelta(previous, delta, reason) {
|
|
11
|
+
switch (reason) {
|
|
12
|
+
case 'set-queue':
|
|
13
|
+
return delta.inserted.slice();
|
|
14
|
+
case 'clear':
|
|
15
|
+
return [];
|
|
16
|
+
case 'add':
|
|
17
|
+
{
|
|
18
|
+
const next = previous.slice();
|
|
19
|
+
next.splice(delta.insertedAt, 0, ...delta.inserted);
|
|
20
|
+
return next;
|
|
21
|
+
}
|
|
22
|
+
case 'remove':
|
|
23
|
+
{
|
|
24
|
+
const drop = new Set(delta.removed);
|
|
25
|
+
return previous.filter((_, i) => !drop.has(i));
|
|
26
|
+
}
|
|
27
|
+
case 'move':
|
|
28
|
+
{
|
|
29
|
+
const next = previous.slice();
|
|
30
|
+
const [moved] = next.splice(delta.movedFrom, 1);
|
|
31
|
+
if (moved) next.splice(delta.movedTo, 0, moved);
|
|
32
|
+
return next;
|
|
33
|
+
}
|
|
34
|
+
case 'shuffle':
|
|
35
|
+
// `order[i]` is where the track now at `i` used to be.
|
|
36
|
+
return delta.order.map(from => previous[from]);
|
|
37
|
+
default:
|
|
38
|
+
return previous;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=queueDelta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["applyQueueDelta","previous","delta","reason","inserted","slice","next","splice","insertedAt","drop","Set","removed","filter","_","i","has","moved","movedFrom","movedTo","order","map","from"],"sourceRoot":"../../src","sources":["queueDelta.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAC7BC,QAAqB,EACrBC,KAAuB,EACvBC,MAAyB,EACZ;EACb,QAAQA,MAAM;IACZ,KAAK,WAAW;MACd,OAAOD,KAAK,CAACE,QAAQ,CAACC,KAAK,CAAC,CAAC;IAC/B,KAAK,OAAO;MACV,OAAO,EAAE;IACX,KAAK,KAAK;MAAE;QACV,MAAMC,IAAI,GAAGL,QAAQ,CAACI,KAAK,CAAC,CAAC;QAC7BC,IAAI,CAACC,MAAM,CAACL,KAAK,CAACM,UAAU,EAAE,CAAC,EAAE,GAAGN,KAAK,CAACE,QAAQ,CAAC;QACnD,OAAOE,IAAI;MACb;IACA,KAAK,QAAQ;MAAE;QACb,MAAMG,IAAI,GAAG,IAAIC,GAAG,CAACR,KAAK,CAACS,OAAO,CAAC;QACnC,OAAOV,QAAQ,CAACW,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK,CAACL,IAAI,CAACM,GAAG,CAACD,CAAC,CAAC,CAAC;MAChD;IACA,KAAK,MAAM;MAAE;QACX,MAAMR,IAAI,GAAGL,QAAQ,CAACI,KAAK,CAAC,CAAC;QAC7B,MAAM,CAACW,KAAK,CAAC,GAAGV,IAAI,CAACC,MAAM,CAACL,KAAK,CAACe,SAAS,EAAE,CAAC,CAAC;QAC/C,IAAID,KAAK,EAAEV,IAAI,CAACC,MAAM,CAACL,KAAK,CAACgB,OAAO,EAAE,CAAC,EAAEF,KAAK,CAAC;QAC/C,OAAOV,IAAI;MACb;IACA,KAAK,SAAS;MACZ;MACA,OAAOJ,KAAK,CAACiB,KAAK,CAACC,GAAG,CAAEC,IAAI,IAAKpB,QAAQ,CAACoB,IAAI,CAAE,CAAC;IACnD;MACE,OAAOpB,QAAQ;EACnB;AACF","ignoreList":[]}
|
package/lib/module/types.js
CHANGED
|
@@ -166,6 +166,21 @@ export const crossfadeDurationBounds = {
|
|
|
166
166
|
|
|
167
167
|
// shuffleQueue reordered the queue
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* What a queue mutation did, delivered by `onQueueChange` alongside the reason.
|
|
171
|
+
*
|
|
172
|
+
* Describes the change rather than re-sending the queue, so a reorder costs two
|
|
173
|
+
* numbers instead of one `TrackItem` per entry. Which fields carry meaning
|
|
174
|
+
* depends on the reason; the rest are empty or `-1`.
|
|
175
|
+
*
|
|
176
|
+
* Apply it to your own copy of the queue, or call `getQueue()` if you would
|
|
177
|
+
* rather re-read than track it. `useQueue()` does the former for you.
|
|
178
|
+
*
|
|
179
|
+
* **Not every emptying of the queue is reported.** `destroy()` and `configure()`
|
|
180
|
+
* clear it without an event, and `configure()` runs that teardown on every call,
|
|
181
|
+
* so a mirror held across one is stale with nothing to signal it.
|
|
182
|
+
*/
|
|
183
|
+
|
|
169
184
|
/**
|
|
170
185
|
* How the active track is being played:
|
|
171
186
|
* - `'local'` — `track.url` is a `file://` URL.
|
|
@@ -243,9 +258,8 @@ export const crossfadeDurationBounds = {
|
|
|
243
258
|
* (no skip-next on the last track, no skip-previous on the first).
|
|
244
259
|
*
|
|
245
260
|
* Wrapped in a struct (rather than two separate boolean callback
|
|
246
|
-
* args) so
|
|
247
|
-
* API change.
|
|
248
|
-
* `(bool, bool) → void` callback signatures specifically.
|
|
261
|
+
* args) so further capability flags can be added without a breaking
|
|
262
|
+
* API change.
|
|
249
263
|
*/
|
|
250
264
|
|
|
251
265
|
/**
|
|
@@ -258,8 +272,7 @@ export const crossfadeDurationBounds = {
|
|
|
258
272
|
* converts to a concrete deadline near the track's end.
|
|
259
273
|
*
|
|
260
274
|
* Wrapped in a struct (rather than positional callback args) so fields can be
|
|
261
|
-
* added without a breaking change
|
|
262
|
-
* for multi-primitive callback signatures.
|
|
275
|
+
* added without a breaking change.
|
|
263
276
|
*/
|
|
264
277
|
|
|
265
278
|
// ============================================================
|
|
@@ -277,6 +290,16 @@ export const crossfadeDurationBounds = {
|
|
|
277
290
|
*
|
|
278
291
|
* Construction-fixed like the cache size: changing it at `configure()` clears
|
|
279
292
|
* the cache and rebuilds with the new policy.
|
|
293
|
+
*
|
|
294
|
+
* **Protecting the playing track differs by platform.** Eviction runs on every
|
|
295
|
+
* download commit, so without protection the entry backing the track being
|
|
296
|
+
* played can be deleted while it plays.
|
|
297
|
+
*
|
|
298
|
+
* - **iOS** protects under both policies.
|
|
299
|
+
* - **Android** protects under `'fifo'` only. Media3's LRU evictor has no
|
|
300
|
+
* protected-key concept, and its recency bump is per byte-range span rather
|
|
301
|
+
* than per track, so a long track's already-played spans stay evictable while
|
|
302
|
+
* it is still playing. Choose `'fifo'` if that matters to you.
|
|
280
303
|
*/
|
|
281
304
|
|
|
282
305
|
// ============================================================
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["crossfadeDurationBounds","minMs","maxMs","stepMs","SectionIcon"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["crossfadeDurationBounds","minMs","maxMs","stepMs","SectionIcon"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAqDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqNA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAyBA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,uBAAuB,GAAG;EACrC;EACAC,KAAK,EAAE,KAAK;EACZ;EACAC,KAAK,EAAE,MAAM;EACb;EACAC,MAAM,EAAE;AACV,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;;AAOe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwFA;;AAMA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyDA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;;AAgBvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;;AAcA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AASA;AACA;AACA;AACA;;AAWA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;;AA0BA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HybridObject } from 'react-native-nitro-modules';
|
|
2
|
-
import type { TrackItem, PlayerConfig, PlayerState, BufferState, PlaybackMode, RepeatMode, RemoteControlOptions, StateChangeReason, TrackChangeReason, QueueChangeReason, TrackSource, PlaybackError, PlayerProgress, SkipCapability, SleepTimerState, LookaheadCacheConfig, CacheStatus, MediaSearchRequest, BrowseItem, BrowseSnapshot, ShuffleResult, NowPlayingFormat, ReplayGainMode, PitchCorrectionMode, ServiceReadyReason, VoiceVocabulary } from './types';
|
|
2
|
+
import type { TrackItem, PlayerConfig, PlayerState, BufferState, PlaybackMode, RepeatMode, RemoteControlOptions, StateChangeReason, TrackChangeReason, QueueChangeReason, QueueChangeDelta, TrackSource, PlaybackError, PlayerProgress, SkipCapability, SleepTimerState, LookaheadCacheConfig, CacheStatus, MediaSearchRequest, BrowseItem, BrowseSnapshot, ShuffleResult, NowPlayingFormat, ReplayGainMode, PitchCorrectionMode, ServiceReadyReason, VoiceVocabulary } from './types';
|
|
3
3
|
export interface TrackPlayer extends HybridObject<{
|
|
4
4
|
ios: 'swift';
|
|
5
5
|
android: 'kotlin';
|
|
@@ -78,28 +78,29 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
78
78
|
*/
|
|
79
79
|
moveInQueue(fromIndex: number, toIndex: number): Promise<void>;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Resolves with the current queue snapshot.
|
|
82
82
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* `
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
83
|
+
* Each platform reads the queue on the thread that owns it (the player's
|
|
84
|
+
* serial queue on iOS, main on Android), so the array is internally
|
|
85
|
+
* consistent. The pair `getQueue()` + `getCurrentTrackIndex()` is still
|
|
86
|
+
* **not** atomic — awaiting the first leaves a gap in which a mutation can
|
|
87
|
+
* land, so the index can name a position in a queue you no longer hold. For
|
|
88
|
+
* UI that needs the pair consistent, subscribe: `onTrackChange` delivers
|
|
89
|
+
* `(track, index)` together, and `onQueueChange` delivers the delta and the
|
|
90
|
+
* post-mutation index together under the same mutation.
|
|
90
91
|
*/
|
|
91
|
-
getQueue(): TrackItem[]
|
|
92
|
+
getQueue(): Promise<TrackItem[]>;
|
|
92
93
|
clearQueue(): Promise<void>;
|
|
93
94
|
play(): Promise<void>;
|
|
94
95
|
pause(): Promise<void>;
|
|
95
96
|
stop(): Promise<void>;
|
|
96
97
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
98
|
+
* Re-attempt the current track, from any state. Rebuilds the item, resumes
|
|
99
|
+
* from where it stopped, then plays, and restores the track's automatic
|
|
100
|
+
* retry budget. Use for a "tap to retry" button: e.g. the user left WiFi
|
|
101
|
+
* coverage so the auto-retries failed, then came back in range and taps
|
|
102
|
+
* retry. While casting, forwards a play to the receiver instead. A no-op
|
|
103
|
+
* only when there is no current track.
|
|
103
104
|
*/
|
|
104
105
|
retry(): Promise<void>;
|
|
105
106
|
/** position in seconds from the start of the current track */
|
|
@@ -330,10 +331,12 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
330
331
|
* e.g. inserting a "play next" item or removing an upcoming track — so
|
|
331
332
|
* a reactive queue UI stays in sync.
|
|
332
333
|
*
|
|
333
|
-
* The `(
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
* `
|
|
334
|
+
* The `(delta, currentIndex)` pair is delivered **atomically**: both are
|
|
335
|
+
* captured on the native side under the same mutation, so they never exhibit
|
|
336
|
+
* the skew of awaiting `getQueue()` and then reading
|
|
337
|
+
* `getCurrentTrackIndex()`. The delta describes the change rather than
|
|
338
|
+
* carrying the whole queue, so a reorder costs two numbers instead of one
|
|
339
|
+
* `TrackItem` per entry — see `QueueChangeDelta`. `currentIndex`
|
|
337
340
|
* is `-1` when the queue is empty; note it can shift without the active
|
|
338
341
|
* track changing (e.g. an insert before the current item), which is the
|
|
339
342
|
* case `onTrackChange` does not cover.
|
|
@@ -342,12 +345,12 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
342
345
|
* `addToQueue`, out-of-range `removeFromQueue`, `moveInQueue` with
|
|
343
346
|
* `from === to`) does not fire, and neither do current-index-only
|
|
344
347
|
* changes from auto-advance / skip (those are `onTrackChange`). Does not
|
|
345
|
-
* auto-fire on subscribe; seed initial state from `getQueue()`
|
|
346
|
-
* `useQueue()` hook does this). For a mutation that also changes the
|
|
348
|
+
* auto-fire on subscribe; seed initial state from `getQueue()` once, then
|
|
349
|
+
* apply each delta (the `useQueue()` hook does this). For a mutation that also changes the
|
|
347
350
|
* active track (`set-queue` / `clear` / `shuffle`) this fires first,
|
|
348
351
|
* then `onTrackChange` follows.
|
|
349
352
|
*/
|
|
350
|
-
onQueueChange(callback: (
|
|
353
|
+
onQueueChange(callback: (delta: QueueChangeDelta, currentIndex: number, reason: QueueChangeReason) => void): () => void;
|
|
351
354
|
/**
|
|
352
355
|
* Subscribes to playback-progress ticks. Native side fires at ~2 Hz
|
|
353
356
|
* via `addPeriodicTimeObserver` (iOS) / a coroutine-driven handler
|
|
@@ -393,10 +396,8 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
393
396
|
* call `getCanSkipNext` / `getCanSkipPrevious` first).
|
|
394
397
|
*
|
|
395
398
|
* Wrapped in a `SkipCapability` struct (rather than two boolean
|
|
396
|
-
* callback args) so
|
|
397
|
-
* a breaking API change.
|
|
398
|
-
* codegen bug for `(bool, bool) → void` callback signatures
|
|
399
|
-
* specifically.
|
|
399
|
+
* callback args) so further capability flags can be added without
|
|
400
|
+
* a breaking API change.
|
|
400
401
|
*/
|
|
401
402
|
onSkipCapabilityChange(callback: (capability: SkipCapability) => void): () => void;
|
|
402
403
|
/**
|
|
@@ -482,6 +483,16 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
482
483
|
* library refresh — not every launch — and the lib dispatches the
|
|
483
484
|
* actual write to a background queue per Apple's guidance.
|
|
484
485
|
*
|
|
486
|
+
* **Inert unless `PlayerConfig.voiceVocabularyDonationEnabled` was `true` at
|
|
487
|
+
* the first `configure()`,** and enabling that requires the
|
|
488
|
+
* `com.apple.developer.siri` entitlement — Xcode's Siri capability — not
|
|
489
|
+
* just `NSSiriUsageDescription` in Info.plist. `INVocabulary` checks for the
|
|
490
|
+
* entitlement at runtime and raises an Objective-C exception without it,
|
|
491
|
+
* which cannot be caught from Swift and terminates the app. iOS gives a
|
|
492
|
+
* process no way to read its own entitlements, so the opt-in is the
|
|
493
|
+
* library's only signal that this is safe to call: leave it `false` unless
|
|
494
|
+
* the Siri capability is on the target.
|
|
495
|
+
*
|
|
485
496
|
* **Android**: no-op. Google Assistant has no in-app vocabulary
|
|
486
497
|
* donation API.
|
|
487
498
|
*/
|
|
@@ -553,6 +564,15 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
553
564
|
* immediate Android eviction must `await player.destroy()` then
|
|
554
565
|
* `await player.configure({ ... })` to force a rebuild.
|
|
555
566
|
*
|
|
567
|
+
* **Cross-platform note on `allowsCellularAccess`**: live on both,
|
|
568
|
+
* but enforced at different points. iOS sets it on each prefetch
|
|
569
|
+
* request and the OS refuses the request; a download already on
|
|
570
|
+
* the wire finishes under the value it started with. Android has
|
|
571
|
+
* no per-request equivalent, so prefetch stops being scheduled
|
|
572
|
+
* while the default network is cellular, which also cancels the
|
|
573
|
+
* download in flight — its partial data stays cached and resumes
|
|
574
|
+
* later. Neither platform gates playback on it.
|
|
575
|
+
*
|
|
556
576
|
* **Cross-platform note on enable transition**: flipping `enabled`
|
|
557
577
|
* from `false` → `true` follows the same Android limitation —
|
|
558
578
|
* a fresh SimpleCache is only constructed during `configureInternal`,
|
|
@@ -562,7 +582,7 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
562
582
|
* immediate.
|
|
563
583
|
*/
|
|
564
584
|
setLookaheadCache(config: LookaheadCacheConfig): Promise<void>;
|
|
565
|
-
getLookaheadCacheStatus(): CacheStatus
|
|
585
|
+
getLookaheadCacheStatus(): Promise<CacheStatus>;
|
|
566
586
|
/**
|
|
567
587
|
* Wipe every cached entry + cancel any in-flight prefetch. Does
|
|
568
588
|
* NOT auto-restart the prefetcher — `clear` means "wipe and stop".
|
|
@@ -571,6 +591,11 @@ export interface TrackPlayer extends HybridObject<{
|
|
|
571
591
|
* prefetch window.
|
|
572
592
|
*/
|
|
573
593
|
clearLookaheadCache(): Promise<void>;
|
|
594
|
+
/**
|
|
595
|
+
* Fires once on subscribe with the current status, then after every
|
|
596
|
+
* `setLookaheadCache()`, prefetch completion and `clearLookaheadCache()`.
|
|
597
|
+
* An eviction shows in the next snapshot those produce.
|
|
598
|
+
*/
|
|
574
599
|
onCacheStatusChange(callback: (status: CacheStatus) => void): () => void;
|
|
575
600
|
/**
|
|
576
601
|
* Set the ReplayGain loudness-normalisation mode.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrackPlayer.nitro.d.ts","sourceRoot":"","sources":["../../src/TrackPlayer.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EAChB,MAAM,SAAS,CAAC;AAMjB,MAAM,WAAW,WACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IAEzD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C;;;;;;;;;;OAUG;IACH,OAAO,IAAI,O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e,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAElD;;;;;;;;;;;;;;;OAeG;IACH,cAAc,IAAI,OAAO,CAAC;IAE1B;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CACZ,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,GAC7C,MAAM,IAAI,CAAC;IAGd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,uBAAuB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAChD;;;;;;OAMG;IACH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,2CAA2C;IAC3C,iBAAiB,IAAI,cAAc,CAAC;IAEpC;;;;;;;;OAQG;IACH,mBAAmB,IAAI,gBAAgB,GAAG,IAAI,CAAC;IAC/C;;;;;;OAMG;IACH,wBAAwB,CACtB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,GAClD,MAAM,IAAI,CAAC;CACf"}
|
|
@@ -9,13 +9,11 @@ export interface ActiveTrackSnapshot {
|
|
|
9
9
|
/**
|
|
10
10
|
* Subscribes to native `onTrackChange` updates.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `(track, index, reason)` triple. Consumers needing an atomic
|
|
18
|
-
* snapshot should wait for the first listener fire.
|
|
12
|
+
* Renders empty for the first frame, then fills in: the seed reads
|
|
13
|
+
* `getQueue()`, which resolves asynchronously, and pairs it with a separately
|
|
14
|
+
* read index — so it can briefly observe a new list against an old index. Any
|
|
15
|
+
* `onTrackChange` that arrives first wins and the seed is dropped, since the
|
|
16
|
+
* event delivers a consistent `(track, index, reason)` triple.
|
|
19
17
|
*/
|
|
20
18
|
export declare function useActiveTrack(): ActiveTrackSnapshot;
|
|
21
19
|
//# sourceMappingURL=useActiveTrack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveTrack.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActiveTrack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAQD
|
|
1
|
+
{"version":3,"file":"useActiveTrack.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActiveTrack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAQD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,mBAAmB,CAkCpD"}
|
|
@@ -15,7 +15,12 @@ export interface CastSnapshot {
|
|
|
15
15
|
* clear by re-reading state after surfacing a banner.
|
|
16
16
|
*/
|
|
17
17
|
lastSessionDied: CastSessionDiedEvent | null;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Local Network permission state. Seeded from
|
|
20
|
+
* `getLocalNetworkPermissionState()` on mount and updated by every
|
|
21
|
+
* `onLocalNetworkPermissionChange` delivery; `'granted'` on Android below
|
|
22
|
+
* target SDK 37, which never emits a change.
|
|
23
|
+
*/
|
|
19
24
|
permission: CastLocalNetworkPermission;
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCast.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCast.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useCast.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCast.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,oBAAoB,EAC1B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,kBAAkB,EAAE,YAAY,EAAE,CAAC;IACnC,uEAAuE;IACvE,WAAW,EAAE,OAAO,CAAC;IACrB,oEAAoE;IACpE,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,wEAAwE;IACxE,KAAK,EAAE,SAAS,CAAC;IACjB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC7C;;;;;OAKG;IACH,UAAU,EAAE,0BAA0B,CAAC;CACxC;AAYD;;;;;;;;;GASG;AACH,wBAAgB,OAAO,IAAI,YAAY,CAqDtC"}
|
|
@@ -12,7 +12,8 @@ export interface UseEqualizerResult {
|
|
|
12
12
|
reset: () => Promise<void>;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Subscribes to Equalizer band-change
|
|
15
|
+
* Subscribes to Equalizer band-change and enabled-change events and
|
|
16
|
+
* exposes imperative setters.
|
|
16
17
|
* Initial state is pulled synchronously on mount so consumers don't flash
|
|
17
18
|
* empty bands.
|
|
18
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEqualizer.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEqualizer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED
|
|
1
|
+
{"version":3,"file":"useEqualizer.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEqualizer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CA8FjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLookaheadCache.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLookaheadCache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAcD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,
|
|
1
|
+
{"version":3,"file":"useLookaheadCache.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLookaheadCache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAElE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAcD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,CAsB3D"}
|
|
@@ -11,10 +11,10 @@ export interface QueueSnapshot {
|
|
|
11
11
|
* `onTrackChange` so `currentIndex` stays live on auto-advance / skip,
|
|
12
12
|
* which move the active position without changing the queue contents.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Renders empty for the first frame, then fills in: the seed reads
|
|
15
|
+
* `getQueue()`, which resolves asynchronously. A mutation landing in that gap
|
|
16
|
+
* is not lost: a delta that arrives before the seed lands cannot be applied —
|
|
17
|
+
* there is nothing correct to apply it to — so the queue is re-read instead.
|
|
18
18
|
*/
|
|
19
19
|
export declare function useQueue(): QueueSnapshot;
|
|
20
20
|
//# sourceMappingURL=useQueue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueue.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQueue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useQueue.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQueue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;CACtB;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,IAAI,aAAa,CA+ExC"}
|
|
@@ -2,13 +2,14 @@ export type { TrackPlayer } from './TrackPlayer.nitro';
|
|
|
2
2
|
export type { Equalizer } from './Equalizer.nitro';
|
|
3
3
|
export type { Visualizer } from './Visualizer.nitro';
|
|
4
4
|
export type { CastManager } from './CastManager.nitro';
|
|
5
|
-
export type { TrackItem, PlayerConfig, PlayerState, BufferState, PlaybackMode, PlaybackModeKind, RepeatMode, SkipToPreviousBehavior, RemoteSkipMode, RemoteControlOptions, StateChangeReason, TrackChangeReason, QueueChangeReason, TrackSource, PlayerProgress, PlaybackError, PlaybackErrorCode, ShuffleResult, SkipCapability, SleepTimerState, NowPlayingFormat, AudioCodec, AudioContainer, LookaheadCacheConfig, EvictionPolicy, CacheStatus, MediaSearchRequest, MediaSearchType, MediaSearchOrigin, MediaSearchReference, MediaSearchRepeatMode, MediaSearchReleaseDateRange, MediaSearchQueueLocation, BrowseItem, BrowseSection, BrowseSnapshot, ServiceReadyReason, EqualizerBand, EqualizerPreset, ReplayGainMode, PitchCorrectionMode, VisualizerConfig, VisualizerFftSize, VisualizerFrame, VisualizerErrorReason, CastProtocol, CastStreamingModel, CastDeviceKind, CastSessionEndReason, CastLocalNetworkPermission, CastReceiverCapabilities, CastReceiver, CastRoute, CastDiscoveryState, CastSessionDiedEvent, CastLocalNetworkPermissionEvent, CastConnectOptions, AudioRouteKind, AudioRoute, } from './types';
|
|
5
|
+
export type { TrackItem, PlayerConfig, AudioContentType, AudioCategoryOptions, VoiceVocabulary, PlayerState, BufferState, PlaybackMode, PlaybackModeKind, RepeatMode, SkipToPreviousBehavior, RemoteSkipMode, RemoteControlOptions, StateChangeReason, TrackChangeReason, QueueChangeReason, QueueChangeDelta, TrackSource, PlayerProgress, PlaybackError, PlaybackErrorCode, ShuffleResult, SkipCapability, SleepTimerState, NowPlayingFormat, NowPlayingFormatIosExtras, NowPlayingFormatAndroidExtras, AudioCodec, AudioContainer, LookaheadCacheConfig, EvictionPolicy, CacheStatus, MediaSearchRequest, MediaSearchType, MediaSearchOrigin, MediaSearchReference, MediaSearchRepeatMode, MediaSearchReleaseDateRange, MediaSearchQueueLocation, BrowseItem, BrowseSection, BrowseSnapshot, ServiceReadyReason, EqualizerBand, EqualizerPreset, ReplayGainMode, PitchCorrectionMode, VisualizerConfig, VisualizerFftSize, VisualizerFrame, VisualizerErrorReason, CastProtocol, CastStreamingModel, CastDeviceKind, CastSessionEndReason, CastLocalNetworkPermission, CastReceiverCapabilities, CastReceiver, CastRoute, CastDiscoveryState, CastSessionDiedEvent, CastLocalNetworkPermissionEvent, CastConnectOptions, CastConfigureOptions, AudioRouteKind, AudioRoute, } from './types';
|
|
6
6
|
export { getCastManager, getEqualizer, getTrackPlayer, getVisualizer } from './clients';
|
|
7
7
|
export { registerPlaybackService, unregisterPlaybackService, } from './playbackService';
|
|
8
8
|
export type { PlaybackServiceHandler, PlaybackServiceFactory, } from './playbackService';
|
|
9
9
|
export { crossfadeDurationBounds } from './types';
|
|
10
10
|
export { SectionIcon } from './types';
|
|
11
11
|
export { EQ_BAND_COUNT, EQ_BAND_FREQUENCIES_HZ, EQ_FLAT_PRESET_NAME, EQ_GAIN_MAX_DB, EQ_GAIN_MIN_DB, clampGain, gainsFromBands, gainsFromMap, isBuiltinPreset, nearestBandIndex, } from './equalizer';
|
|
12
|
+
export { applyQueueDelta } from './queueDelta';
|
|
12
13
|
export * from './hooks';
|
|
13
14
|
export * as Cast from './cast';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,YAAY,EAEV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,cAAc,EAEd,oBAAoB,EACpB,cAAc,EACd,WAAW,EAEX,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,UAAU,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAElB,aAAa,EACb,eAAe,EAEf,cAAc,EAEd,mBAAmB,EAEnB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EAErB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACpB,+BAA+B,EAC/B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,YAAY,EAEV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,cAAc,EAC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}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { QueueChangeDelta, QueueChangeReason, TrackItem } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Rebuild the queue from the previous copy plus one change.
|
|
4
|
+
*
|
|
5
|
+
* Exported from the package root as the reference for what a consumer must do
|
|
6
|
+
* with a delta; `useQueue` applies it too. The shapes it reads are documented
|
|
7
|
+
* on [QueueChangeDelta].
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyQueueDelta(previous: TrackItem[], delta: QueueChangeDelta, reason: QueueChangeReason): TrackItem[];
|
|
10
|
+
//# sourceMappingURL=queueDelta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queueDelta.d.ts","sourceRoot":"","sources":["../../src/queueDelta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,EAAE,EACrB,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,iBAAiB,GACxB,SAAS,EAAE,CA2Bb"}
|