Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now playing #43

Closed
maendamedia opened this issue May 19, 2021 · 30 comments
Closed

Now playing #43

maendamedia opened this issue May 19, 2021 · 30 comments

Comments

@maendamedia
Copy link

Hi,

is there any progress on the now playing template?

i like to integrate it with react native track player to show now playing and cover art, but not sure how to do this.

thanks

@maendamedia maendamedia changed the title Now playjng Now playing May 19, 2021
@maendamedia
Copy link
Author

Any ideas on this?

@birkir
Copy link
Owner

birkir commented May 23, 2021

Looks like we need to implement the CPNowPlayingTemplateObserver for button events.

Also the types of available buttons, which are

  • CPNowPlayingImageButton
  • CPNowPlayingAddToLibraryButton
  • CPNowPlayingMoreButton
  • CPNowPlayingPlaybackRateButton
  • CPNowPlayingRepeatButton
  • CPNowPlayingShuffleButton

The template also requires an “audio” entitlement.

Also you would need a package to manage the MPNowPlaying with an external library like https://github.com/tanguyantoine/react-native-music-control

@maendamedia
Copy link
Author

Hi Birkir,

Ok, that needs to be implemented in the library you mean?
An audio entitlement is already present and rnmc also :)

Thanks for this good work!

@maendamedia
Copy link
Author

Hi Birkir,

Ok, that needs to be implemented in the library you mean?
An audio entitlement is already present and rnmc also :)

Thanks for this good work!

Can you let me know?

@birkir
Copy link
Owner

birkir commented Jun 4, 2021

Needs to be implemented in the library

@maendamedia
Copy link
Author

Needs to be implemented in the library

Ok, thanks. That would be very great, as we have a lot of requests for it :)

@ForrestDWS
Copy link

I'm trying to implement the NowPlayingTemplate as well. Where does this library catch me trying to use NowPlayingTemplate in pushTemplate()? Thank you!
Simulator Screen Shot - iPhone 11 - 2021-06-24 at 16 58 20

@ForrestDWS
Copy link

I'm trying to implement the NowPlayingTemplate as well. Where does this library catch me trying to use NowPlayingTemplate in pushTemplate()? Thank you!
Simulator Screen Shot - iPhone 11 - 2021-06-24 at 16 58 20

Ah, nm, i had the wrong entitlement set up :)

@maendamedia
Copy link
Author

I'm trying to implement the NowPlayingTemplate as well. Where does this library catch me trying to use NowPlayingTemplate in pushTemplate()? Thank you!
Simulator Screen Shot - iPhone 11 - 2021-06-24 at 16 58 20

Ah, nm, i had the wrong entitlement set up :)

Does this mean you got it working?
If so: may i ask how you’ve done it? ☺️

@ForrestDWS
Copy link

@maendamedia I could not. I took a break from this. But I just noticed this PR that seems to enable it: #48

@ForrestDWS
Copy link

I'm trying to implement the NowPlayingTemplate as well. Where does this library catch me trying to use NowPlayingTemplate in pushTemplate()? Thank you!
Simulator Screen Shot - iPhone 11 - 2021-06-24 at 16 58 20

Ah, nm, i had the wrong entitlement set up :)

Actually, I'm not sure about whether my entitlements are wrong. What should I have set in my entitlements.plist file? Here are my current ones
<key>com.apple.developer.carplay-parking</key> <true/> <key>com.apple.developer.carplay-audio</key> <true/> <key>com.apple.developer.carplay-communication</key> <true/> <key>com.apple.developer.carplay-charging</key> <true/> <key>com.apple.developer.carplay-maps</key> <true/>

@ForrestDWS ForrestDWS mentioned this issue Jul 22, 2021
@gavrichards
Copy link

I would love to use this library but require a now playing screen as it's for a radio playing app.

@rajpootathar
Copy link

Any timeline for this now playing feature?

@gavrichards
Copy link

Is there any update on this?

Weirdly, this release actually mentions it now includes a Now Playing Template:
https://github.com/birkir/react-native-carplay/releases/tag/0.3.0

But at the bottom of the README, there's a section titled "Not working / In progress", and it includes Now Playing Template, and there's no example given.

@birkir
Copy link
Owner

birkir commented Jun 8, 2022

@Summurai
Copy link

Summurai commented Oct 6, 2022

Any updates or time estimation on that?

@Czarczynski
Copy link

@birkir Is there any chance to get Now Playing this year?

@dani-cabal
Copy link

Hi! Has anyone been able to get NowPlaying template to work? I can't find any instructions anywhere to show the template, as it's not supposed to be pushed or presented like any other.

@birkir
Copy link
Owner

birkir commented May 24, 2023

https://github.com/birkir/react-native-carplay/blob/master/example/src/screens/NowPlaying.tsx

Please reopen if there is still an issue with Now Playing 🙂

@birkir birkir closed this as completed May 24, 2023
@DanielKuhn
Copy link
Contributor

Hi! Has anyone been able to get NowPlaying template to work? I can't find any instructions anywhere to show the template, as it's not supposed to be pushed or presented like any other.

I got it to work by adding a button for it in apps/example/src/screens/Menu.tsx and only setting the entitlement to com.apple.developer.carplay-audio

The entitlements seem to be mutually exclusive... See the entitlement-matrix: Now playing is only allowed for audio apps. When combining with other entitlements, these seem to block the audio entitlement/NowPlaying-screen.
Likewise, for the audio entitlement screens like Map, Search and Info are blocked.

You need to set the entitlements according to the matrix depending on which screens you want to test.

@DanielKuhn
Copy link
Contributor

Hi all,
I'm currently working on integrating Android Auto and CarPlay with our react native app, which uses react-native-track-player for audio playback:

For CarPlay, the current master of react-native-carplay by @birkir features a NowPlaying-template which integrates smoothly with RNTP, since RNTP syncs with the native iOS audio player and the NowPlaying view is accessible throughout the whole Apple ecosystem (iOS/iPadOS, watchOS, and of course CarPlay), so displaying the currently running track is as simple as playing it in RNTP and then pushing the NowPlaying template onto the CarPlay view stack.

For Android Auto there's active development in this RNTP-PR by @lovegaoshi which also features a NowPlaying-view for Android Auto.

@jakob-fankhauser
Copy link

@DanielKuhn

Did you also manage to display the artwork image from RNTP in CarPlay?

@DanielKuhn
Copy link
Contributor

DanielKuhn commented Oct 6, 2023

@DanielKuhn

Did you also manage to display the artwork image from RNTP in CarPlay?

As mentioned above, this is handled by the apple ecosystem itself: If a track with artwork is running in RNTP, then the artwork is visible throughout the whole ecosystem:

  • iOS/iPadOS control center
  • iOS/iPadOS lock screen
  • watchOS "Now Playing" app
  • CarPlay Now Playing template

The Simulator app on macOS (External Displays > CarPlay) sometimes is unreliable with the NowPlaying screen, but I haven't had any problems with a real CarPlay device.

@DanielKuhn
Copy link
Contributor

DanielKuhn commented Oct 6, 2023

@jakob-fankhauser note also that the CarPlay-window of the Simulator app (External Displays > CarPlay) represents a very small CarPlay screen where the artwork is used only as a blurred background in the NowPlaying screen. On larger CarPlay screens the artwork is positioned to the right of the timeline/progress bar and metadata.

@elieT27
Copy link

elieT27 commented Dec 6, 2023

@DanielKuhn To clear this up without an actual entitlement I cannot test implementing NowPlaying template on my app using RNTP ?

@DanielKuhn
Copy link
Contributor

@elieT27 In development you can simply set the entitlement yourself.
An "actual" entitlement from apple is only needed for releasing via appstore

@syedslegend786
Copy link

Hi,

is there any progress on the now playing template?

i like to integrate it with react native track player to show now playing and cover art, but not sure how to do this.

thanks

Hi, do you have any example project running with , react-native-track-payer, react-native-car-player. I am gettings error when i push noewPlayingTemplate

@syedslegend786
Copy link

@DanielKuhn To clear this up without an actual entitlement I cannot test implementing NowPlaying template on my app using RNTP ?

Did you able to use NowPlayingTemplate with RNTP?
if yes could you please share the repo of yours, because mine is not working.
its giving template not found

@Ali-ch88
Copy link

Ali-ch88 commented Jun 5, 2024

@DanielKuhn I need some guidelines regarding NowPlayingTemplate with RNTP.
Currently, we're working on the React Native application in which we have implemented the React Native track player, now our goal is to connect our app with the Android auto and We're using NowPlayingTemplate for this purpose but having this issue, So need to confirmation that NowPlaying Template is working properly with RNTP or not?
ss34

@DanielKuhn
Copy link
Contributor

Hi all, I'm currently working on integrating Android Auto and CarPlay with our react native app, which uses react-native-track-player for audio playback:

For CarPlay, the current master of react-native-carplay by @birkir features a NowPlaying-template which integrates smoothly with RNTP, since RNTP syncs with the native iOS audio player and the NowPlaying view is accessible throughout the whole Apple ecosystem (iOS/iPadOS, watchOS, and of course CarPlay), so displaying the currently running track is as simple as playing it in RNTP and then pushing the NowPlaying template onto the CarPlay view stack.

For Android Auto there's active development in this RNTP-PR by @lovegaoshi which also features a NowPlaying-view for Android Auto.

Please see above ⬆️
I cannot share code because it is a private project, but as I stated above we're using react-native-carplay for iOS and @lovegaoshi 's branch of RNTP for Android in production.
I don't know the current state of the Android implementation (including NowPlaying) of react-native-carplay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests