Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure of this._audioProvider.tracks duration seeking #198

Open
rdai opened this issue May 30, 2018 · 0 comments
Open

Structure of this._audioProvider.tracks duration seeking #198

rdai opened this issue May 30, 2018 · 0 comments

Comments

@rdai
Copy link

rdai commented May 30, 2018

Hi,

I am trying to store the location of the last play/pause event, then move the progress to that location on the next launch, a common feature I feel I should provide. I have my project all working nicely then I realized it breaks for Android <=5? Because I am storing the entire this._audioProvider.tracks[i] object via something like this.storage.set(curTrack, this._audioProvider.tracks[audioID]); and the Storage module uses JSON.stringfy which threws an error about circular reference for Android <=5.

It is bit of a mystery why it worked on Android 7 anyway since it is still calling JSON.stringfy I am assuming?

I am storing the whole object as opposed to individual pieces because I spent a lot of time trying to figure out the structure of the this._audioProvider.tracks[audioID]) and manually setting duration progress and completed doesn't seem to get the job done because some of the variables are private/not writable?

I tried to use other JSON stringfy libraries but that means I have to not use Storage or hack it.

Anyway, any advice would be welcome. Maybe on the structure of the this._audioProvider.tracks[audioID]), or advice on how to storage progress and duration and setting those on next launch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant