0

I am doing iOS react-native app. App is video player, which can connect to ChromeCast. I have a task to control ChromeCast volume with iPhone volume buttons. Does anyone know how to do it in react-native. Or at least explain how to detect it with IOS (objective-c)?

Regards, Vitalii

Vitalii
  • 89
  • 2
  • 5
  • Does this answer your question? [Detect volume button press](https://stackoverflow.com/questions/28471481/detect-volume-button-press) – Julia May 18 '22 at 11:19
  • 1
    Check out this answer: https://stackoverflow.com/a/61738461/19027584 – Martinez May 18 '22 at 17:16

1 Answers1

0

Using this library https://github.com/rtmalone/react-native-volume-control you can detect volume press event via hardware button

  • 1
    That looks very promising but it's not been touched in years and needs a bit of attention before it can be used again. – Julian H Oct 14 '22 at 13:37
  • @JulianH You can always fork the repo and make necessary and add your github link as npm module or publish to npm as your own module. I am gonna try doing that. – Arjun Nayak Dec 13 '22 at 16:32
  • If you do make changes I'd love to use them! – Julian H Dec 28 '22 at 16:59