fix(rn,audio) fix playback after API change
Upstream now skips the callback, so we need to provide one.
This commit is contained in:
parent
29eb9452c0
commit
90f836040f
|
@ -69,7 +69,13 @@ export default class Audio extends AbstractAudio {
|
|||
play() {
|
||||
if (this._sound) {
|
||||
this._sound.setNumberOfLoops(this.props.loop ? -1 : 0);
|
||||
super.play();
|
||||
|
||||
// $FlowExpectedError
|
||||
this._sound.play(success => {
|
||||
if (!success) {
|
||||
logger.warn(`Failed to play ${this.props.src}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue