@neoskola/auto-play 0.3.15 → 0.3.16

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.
@@ -38,16 +38,15 @@ class NowPlayingTemplate: NSObject, AutoPlayTemplate {
38
38
  // Set the config ID on the shared singleton so TemplateStore can find it
39
39
  initTemplate(template: CPNowPlayingTemplate.shared, id: config.id)
40
40
 
41
- DispatchQueue.main.async { [weak self] in
42
- guard let self = self else { return }
43
- NowPlayingSessionManager.shared.ensureSessionActive()
44
- self.setupRemoteCommandCenter()
45
- self.updateNowPlayingInfo()
46
- self.isSetupComplete = true
41
+ // Setup remote commands and now playing info synchronously
42
+ // so they're ready before CPNowPlayingTemplate.shared is pushed
43
+ NowPlayingSessionManager.shared.ensureSessionActive()
44
+ setupRemoteCommandCenter()
45
+ updateNowPlayingInfo()
46
+ isSetupComplete = true
47
47
 
48
- if let image = config.image {
49
- self.loadImageAsync(image: image)
50
- }
48
+ if let image = config.image {
49
+ loadImageAsync(image: image)
51
50
  }
52
51
  }
53
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoskola/auto-play",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "Android Auto and Apple CarPlay for react-native",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",