LoginSignup
0
2

More than 3 years have passed since last update.

react-native-track-playerのiOSのプレイヤーで一時停止が効かない

Last updated at Posted at 2020-10-20

capabilitiesの設定が必要です!

A9228270-254F-4BAD-89CA-31FA9651D106.PNG

await TrackPlayer.updateOptions({
    stopWithApp: true,
    capabilities: [
        TrackPlayer.CAPABILITY_PLAY,
        TrackPlayer.CAPABILITY_PAUSE,
        TrackPlayer.CAPABILITY_SKIP_TO_NEXT,
        TrackPlayer.CAPABILITY_SKIP_TO_PREVIOUS,
        TrackPlayer.CAPABILITY_STOP
    ],
    compactCapabilities: [
        TrackPlayer.CAPABILITY_PLAY,
        TrackPlayer.CAPABILITY_PAUSE
    ]
})

example動かして気づいた・・・

参考文献

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2