-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
2,390 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "API Reference", | ||
"position": 3 | ||
} |
4 changes: 4 additions & 0 deletions
4
docs/versioned_docs/version-4.0/api/constants/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Constants", | ||
"position": 4 | ||
} |
25 changes: 25 additions & 0 deletions
25
docs/versioned_docs/version-4.0/api/constants/app-killed-playback-behavior.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
sidebar_position: 6 | ||
--- | ||
|
||
# App Killed Playback Behavior (android-only) | ||
|
||
```ts | ||
import { AppKilledPlaybackBehavior } from 'react-native-track-player'; | ||
``` | ||
|
||
## `ContinuePlayback` (default) | ||
|
||
This option will continue playing audio in the background when the app is | ||
removed from recents. The notification remains. This is the default. | ||
|
||
## `PausePlayback` | ||
|
||
This option will pause playing audio in the background when the app is removed | ||
from recents. The notification remains and can be used to resume playback. | ||
|
||
## `StopPlaybackAndRemoveNotification` | ||
|
||
This option will stop playing audio in the background when the app is removed | ||
from recents. The notification is removed and can't be used to resume playback. | ||
Users would need to open the app again to start playing audio. |
29 changes: 29 additions & 0 deletions
29
docs/versioned_docs/version-4.0/api/constants/capability.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Capability | ||
|
||
All Capability types are made available through the named export `Capability`: | ||
|
||
```ts | ||
import { Capability } from 'react-native-track-player'; | ||
``` | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| `Play` | Capability indicating the ability to play | | ||
| `PlayFromId` | Capability indicating the ability to play from a track id (Required for Android Auto) | | ||
| `PlayFromSearch` | Capability indicating the ability to play from a text/voice search (Required for Android Auto) | | ||
| `Pause` | Capability indicating the ability to pause | | ||
| `Stop` | Capability indicating the ability to stop (on iOS available only for tracks where `.isLiveStream` is `true`) | | ||
| `SeekTo` | Capability indicating the ability to seek to a position in the timeline | | ||
| `Skip` | Capability indicating the ability to skip to any song in the queue | | ||
| `SkipToNext` | Capability indicating the ability to skip to the next track | | ||
| `SkipToPrevious` | Capability indicating the ability to skip to the previous track | | ||
| `SetRating` | Capability indicating the ability to set the rating value based on the rating type | | ||
| `JumpForward` | Capability indicating the ability to jump forward by the amount of seconds specified in the options | | ||
| `JumpBackward` | Capability indicating the ability to jump backward by the amount of seconds specified in the options | | ||
| `Like` | (ios-only) Capability indicating the ability to like from control center | | ||
| `Dislike` | (ios-only) Capability indicating the ability to dislike from control center | | ||
| `Bookmark` | (ios-only) Capability indicating the ability to bookmark from control center | |
67 changes: 67 additions & 0 deletions
67
docs/versioned_docs/version-4.0/api/constants/ios-category-mode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
sidebar_position: 7 | ||
--- | ||
|
||
# iOS Category Mode (ios-only) | ||
|
||
All iOS Category Mode types are made available through the named export `IOSCategoryMode`: | ||
|
||
## `Default` | ||
|
||
The default audio session mode. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616579-default) | ||
|
||
## `GameChat` | ||
|
||
A mode that the GameKit framework sets on behalf of an application that | ||
uses GameKit’s voice chat service. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616511-gamechat) | ||
|
||
|
||
## `Measurement` | ||
|
||
A mode that indicates that your app is performing measurement of audio | ||
input or output. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616608-measurement) | ||
|
||
## `MoviePlayback` | ||
|
||
A mode that indicates that your app is playing back movie content. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616623-movieplayback) | ||
|
||
## `SpokenAudio` | ||
|
||
A mode used for continuous spoken audio to pause the audio when another | ||
app plays a short audio prompt. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616510-spokenaudio) | ||
|
||
## `VideoChat` | ||
|
||
A mode that indicates that your app is engaging in online video conferencing. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616590-videochat) | ||
|
||
## `VideoRecording` | ||
|
||
A mode that indicates that your app is recording a movie. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616535-videorecording) | ||
|
||
## `VoiceChat` | ||
|
||
A mode that indicates that your app is performing two-way voice communication, | ||
such as using Voice over Internet Protocol (VoIP). | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/1616455-voicechat) | ||
|
||
|
||
## `VoicePrompt` | ||
|
||
A mode that indicates that your app plays audio using text-to-speech. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/2962803-voiceprompt) |
60 changes: 60 additions & 0 deletions
60
docs/versioned_docs/version-4.0/api/constants/ios-category-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
sidebar_position: 8 | ||
--- | ||
|
||
# iOS Category Options (ios-only) | ||
|
||
All iOS Category Options types are made available through the named export `IOSCategoryOptions`: | ||
|
||
```ts | ||
import { IOSCategoryOptions } from 'react-native-track-player'; | ||
``` | ||
|
||
## `MixWithOthers` | ||
|
||
An option that indicates whether audio from this session mixes with audio | ||
from active sessions in other audio apps. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616611-mixwithothers) | ||
|
||
## `DuckOthers` | ||
|
||
An option that reduces the volume of other audio sessions while audio from | ||
this session plays. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616618-duckothers) | ||
|
||
## `InterruptSpokenAudioAndMixWithOthers` | ||
|
||
An option that determines whether to pause spoken audio content from other | ||
sessions when your app plays its audio. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616534-interruptspokenaudioandmixwithot) | ||
|
||
## `AllowBluetooth` | ||
|
||
An option that determines whether Bluetooth hands-free devices appear as | ||
available input routes. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616518-allowbluetooth) | ||
|
||
## `AllowBluetoothA2DP` | ||
|
||
An option that determines whether you can stream audio from this session | ||
to Bluetooth devices that support the Advanced Audio Distribution Profile (A2DP). | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1771735-allowbluetootha2dp) | ||
|
||
## `AllowAirPlay` | ||
|
||
An option that determines whether you can stream audio from this session | ||
to AirPlay devices. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1771736-allowairplay) | ||
|
||
## `DefaultToSpeaker` | ||
|
||
An option that determines whether audio from the session defaults to the | ||
built-in speaker instead of the receiver. | ||
|
||
[See the Apple Docs ](https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616462-defaulttospeaker) |
52 changes: 52 additions & 0 deletions
52
docs/versioned_docs/version-4.0/api/constants/ios-category.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
sidebar_position: 6 | ||
--- | ||
|
||
# iOS Category (ios-only) | ||
|
||
All iOS Category types are made available through the named export `IOSCategory`: | ||
|
||
```ts | ||
import { IOSCategory } from 'react-native-track-player'; | ||
``` | ||
|
||
## `Playback` | ||
|
||
The category for playing recorded music or other sounds that are central to the | ||
successful use of your app. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616509-playback) | ||
|
||
|
||
## `PlayAndRecord` | ||
|
||
The category for recording (input) and playback (output) of audio, such as for a | ||
Voice over Internet Protocol (VoIP) app. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616568-playandrecord) | ||
|
||
## `MultiRoute` | ||
|
||
The category for routing distinct streams of audio data to different output | ||
devices at the same time. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616484-multiroute) | ||
|
||
## `Ambient` | ||
|
||
The category for an app in which sound playback is nonprimary — that is, your | ||
app also works with the sound turned off. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616560-ambient) | ||
|
||
## `SoloAmbient` | ||
|
||
The default audio session category. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616488-soloambient) | ||
|
||
## `Record` | ||
|
||
The category for recording audio while also silencing playback audio. | ||
|
||
[See the Apple Docs](https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616451-record) |
Oops, something went wrong.