Hi
this.platform.ready().then(() => {
this.nativeAudio.preloadComplex(.....,....., 1, 1, 0)
.then(() => {this.nativeAudio.play(.....);});
this.nativeAudio.play(.....);}
chrome://inspect
First run
after run
why this error,I dont understand
My guess:
First run: Your last line of the code you posted does the same as the line before, but outside of the then
which doesn’t work as the preloading is not finished yet.
Later runs: You can’t preload the same ID multiple times. You should probably check if it is already preloaded by catching the error in the Promise.
How is first run error solution?
only this code
this.platform.ready().then(() => {
this.nativeAudio.preloadComplex(.....,....., 1, 1, 0)
.then(() => {this.nativeAudio.play(.....);});}
sometimes dont working
I have no idea what you are saying.
That has nothing to do with the thing this topic is about - specific error messages. Please open a new topic for this if you haven’t done so already.
1 Like
First run: Your last line of the code you posted does the same as the line before, but outside of the then which doesn’t work as the preloading is not finished yet.
I mean I don’t need to write the last line
this.platform.ready().then(() => {
this.nativeAudio.preloadComplex(.....,....., 1, 1, 0)
.then(() => {this.nativeAudio.play(.....);});
but after come to same page.its dont work
this.platform.ready().then(() => {
this.nativeAudio.preloadComplex(....,......, 1, 1, 0);
this.nativeAudio.preloadComplex(.....,....., 1, 1, 0);
this.nativeAudio.preloadComplex(.....,.....l, 1, 1, 0);
});
}
This is myPage.
After diffrent page push the this myPage.And this same error.
Thanks.
this.nativeAudio.preloadComplex(..................,................, 1, 1, 0);
this.nativeAudio.preloadComplex(..................,................, 1, 1, 0);
this.nativeAudio.preloadComplex(..................,................, 1, 1, 0);
what I need to write id
OK.I’m solved this error.
Thank you to everyone who helped
Please post the solution and then select it as “solution” (checkbox under the post) so future visitors of your posts also can see how to fix the problem.
I’m used to
this.nativeAudio.preloadComplex(..................,................, 1, 1, 0);
But same id error.So on Leave page
this.nativeAudio.unload(..........);
unload(id)
==>Unloads an audio file from memory
1 Like