You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
I am using this plugin since 1 year and it's working very beautifully. Now when a android 10 user play a mp3 with this notification plugin a seekbar is available in the notification area to seek the position of the mp3 and it's working too but the marked area in the attached image's seekbar current position is never changing it's always show 0 that's means the seekbar is not syncing with the mp3 position.
I have attached a other application working demo Image to explain the problem -
The total code snippet -
musicControlsSetup() {
// const track = this.props.tracks[this.state.selectedTrack];
MusicControl.setNowPlaying({
title: TRACKS[0].title,
artwork: require('../assets/imgs/album.jpg'), // URL or RN's image require()
artist: TRACKS[0].artist,
duration: this.state.totalLength, // (Seconds)
description: '', // Android Only
color: 0x000000, // Notification Color - Android Only
date: '1983-01-02T00:00:00Z', // Release Date (RFC 3339) - Android Only
rating: 84, // Android Only (Boolean or Number depending on the type)
notificationIcon: 'media_play_icon', // Android Only (String), Android Drawable resource name for a custom notification icon
});
// Seeking
MusicControl.enableControl('seek', true); // Android only
// Basic Controls
MusicControl.enableControl('play', true);
MusicControl.enableControl('pause', true);
MusicControl.enableControl('skipBackward', true, {interval: 15});
MusicControl.enableControl('skipForward', true, {interval: 15});
MusicControl.enableControl('closeNotification', true, {when: 'paused'});
MusicControl.enableBackgroundMode(true);
MusicControl.on('play', () => {
this.setState({paused: false});
MusicControl.updatePlayback({
state: MusicControl.STATE_PLAYING, // (STATE_ERROR, STATE_STOPPED, STATE_PLAYING, STATE_PAUSED, STATE_BUFFERING)
});
});
MusicControl.on('pause', () => {
this.setState({paused: true});
MusicControl.updatePlayback({
state: MusicControl.STATE_PAUSED, // (STATE_ERROR, STATE_STOPPED, STATE_PLAYING, STATE_PAUSED, STATE_BUFFERING)
});
});
MusicControl.on('skipForward', () => {
this.seek(this.state.currentPosition + 15);
});
MusicControl.on('skipBackward', () => {
this.seek(this.state.currentPosition - 15);
});
MusicControl.on('seek', (pos) => {
this.seek(pos);
});
}
Platform
iOS
Android
Device
Simulator
Real device
The text was updated successfully, but these errors were encountered:
Issue
I am using this plugin since 1 year and it's working very beautifully. Now when a android 10 user play a mp3 with this notification plugin a seekbar is available in the notification area to seek the position of the mp3 and it's working too but the marked area in the attached image's seekbar current position is never changing it's always show 0 that's means the seekbar is not syncing with the mp3 position.
I have attached a other application working demo Image to explain the problem -
The total code snippet -
Platform
The text was updated successfully, but these errors were encountered: