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
I'm working on an Ionic 3 App which playing both streaming and local files,
So, the play staff is "OK" but with local files the preload:"metadata" is not preloading my tracks (duration, etc ...),
I'm asking if there is a way to force preload for local files. Thanks
let myPath = this.file.externalRootDirectory+track.fullPath.substr(1);
let newTrack = {
src: myPath,
artist: 'John Mayer',
title: "myTitle",
preload: 'metadata'
}
this.myTracks.push(newTrack);
For My Exemple it's playing, but not preloading data, So the data are not loaded until I click "play" for this track. :/ Can someone help me ?
The text was updated successfully, but these errors were encountered:
Hey Community I found the solution, You have just to choose automatically, if the src of the track is a remote "https://...", if must be managed by "WebAudioProvider" in this case the duration will load correctly for remote, and for local files it must be managed by "CordovaMediaProvider" (the duration doesn't work until we click play but it isn't a big matter )
So, the conclusion the provider must be used automatically depending on track ( streaming | local )
export function defaultAudioProviderFactory() {
return window.hasOwnProperty('cordova') && window.hasOwnProperty('Media') ? new CordovaMediaProvider() : new WebAudioProvider();
}
Hi everybody,
I'm working on an Ionic 3 App which playing both streaming and local files,
So, the play staff is "OK" but with local files the preload:"metadata" is not preloading my tracks (duration, etc ...),
I'm asking if there is a way to force preload for local files. Thanks
For My Exemple it's playing, but not preloading data, So the data are not loaded until I click "play" for this track. :/ Can someone help me ?
The text was updated successfully, but these errors were encountered: