mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 06:52:43 +01:00
some progress on now playing
image colors gradient working for now playing fixed track player init losing handle to notification
This commit is contained in:
17
index.js
17
index.js
@@ -7,7 +7,22 @@ enableScreens();
|
||||
import { AppRegistry } from 'react-native';
|
||||
import App from './App';
|
||||
import { name as appName } from './app.json';
|
||||
import TrackPlayer from 'react-native-track-player';
|
||||
import TrackPlayer, { Capability } from 'react-native-track-player';
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
TrackPlayer.registerPlaybackService(() => require('./src/playback/service'));
|
||||
|
||||
async function start() {
|
||||
await TrackPlayer.setupPlayer();
|
||||
await TrackPlayer.updateOptions({
|
||||
capabilities: [
|
||||
Capability.Play,
|
||||
Capability.Pause,
|
||||
Capability.Stop,
|
||||
Capability.SkipToNext,
|
||||
Capability.SkipToPrevious,
|
||||
],
|
||||
compactCapabilities: [Capability.Play, Capability.Pause, Capability.SkipToNext, Capability.SkipToPrevious],
|
||||
});
|
||||
}
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user