@neoskola/auto-play 0.2.3 → 0.2.4
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.
|
@@ -182,16 +182,11 @@ class HybridAutoPlay: HybridAutoPlaySpec {
|
|
|
182
182
|
animated: animated
|
|
183
183
|
)
|
|
184
184
|
} else if carPlayTemplate is CPNowPlayingTemplate {
|
|
185
|
-
// CPNowPlayingTemplate is a singleton — push it
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
animated: true
|
|
191
|
-
)
|
|
192
|
-
} catch {
|
|
193
|
-
print("[AutoPlay] CPNowPlayingTemplate push failed: \(error.localizedDescription)")
|
|
194
|
-
}
|
|
185
|
+
// CPNowPlayingTemplate is a system singleton — do NOT push it.
|
|
186
|
+
// It configures MPNowPlayingInfoCenter and MPRemoteCommandCenter in init,
|
|
187
|
+
// which makes CarPlay show the NowPlaying bar automatically when audio plays.
|
|
188
|
+
print("[AutoPlay] CPNowPlayingTemplate configured (not pushed — managed by system)")
|
|
189
|
+
return
|
|
195
190
|
} else {
|
|
196
191
|
let _ = try await interfaceController.pushTemplate(
|
|
197
192
|
carPlayTemplate,
|