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
The sound comes out from the device as expected when I play the audio object.
What does actually happen?
I have 2 test devices, and on one of them the sound plays but on the other it was playing earlier today but has stopped playing now. The sound doesn't play even though the volume is set to 1.0 and the status callback shows the status as going from 1 to 2 then to 4.
Information
This may sound similar to this issue but I'm not getting the abort error that's reported there.
Command or Code
This is the code I use to play media:
export function playNewMsgAudio(isSend = false) {
const audioObj = new Media(
`${cordova.file.applicationDirectory}www/audio/${
isSend ? 'send' : 'recv'
}-msg.mp3`,
() => {},
error =>
logError(
'failed to initialize audio object for sent message',
{ error }
),
status => {
switch (status) {
case Media.MEDIA_PAUSED:
case Media.MEDIA_STOPPED:
audioObj.release();
break;
default:
break;
}
}
);
audioObj.play();
audioObj.setVolume('1.0');
}
Bug Report
Problem
Sound doesn't play even when there's no error
What is expected to happen?
The sound comes out from the device as expected when I play the audio object.
What does actually happen?
I have 2 test devices, and on one of them the sound plays but on the other it was playing earlier today but has stopped playing now. The sound doesn't play even though the volume is set to 1.0 and the status callback shows the status as going from 1 to 2 then to 4.
Information
This may sound similar to this issue but I'm not getting the
abort
error that's reported there.Command or Code
This is the code I use to play media:
Environment, Platform, Device
Samsung Note 20 Ultra running Android 11, Tekno Pop2 Plus running Android 8.
Version information
Cordova Android 10.1.1, cordova cli 10
Checklist
The text was updated successfully, but these errors were encountered: