@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 but catch errors
186
- // since it can fail if no audio session is active
187
- do {
188
- let _ = try await interfaceController.pushTemplate(
189
- carPlayTemplate,
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoskola/auto-play",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",