When I set music to play , and the app is minimized , music is still played.
I've managed to fix this by :
public registerOnSuspend()
{
applicationOn(suspendEvent, (args: ApplicationEventData) =>
{
if (args.android)
{
this._player.pause();
}
else
{
if (args.ios)
{
this._player.pause();
}
}
});
}
.... same for resume ( but with this._player.resume ();)
But Ive noticed that when the app is minimized ( no music - which is OK.) - and if I try to record a video from camera and then stop , suddenly the music is heard again :
As you can see , even when the registerOnSuspend function got into action ( meaning app is in suspend mode) , TNSPLAYER got resumed
Again , it happened after app is suspend and after I've opened the camera and recorded a few seconds sec video , and stopeed.
When I set music to play , and the app is minimized , music is still played.
I've managed to fix this by :
.... same for resume ( but with
this._player.resume ();
)But Ive noticed that when the app is minimized ( no music - which is OK.) - and if I try to record a video from camera and then stop , suddenly the music is heard again :
As you can see , even when the
registerOnSuspend
function got into action ( meaning app is in suspend mode) , TNSPLAYER got resumedAgain , it happened after app is suspend and after I've opened the camera and recorded a few seconds sec video , and stopeed.