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

how to set self.getSoundByURL(soundURL) unique key? #243

Open
thadeu opened this issue May 3, 2019 · 0 comments
Open

how to set self.getSoundByURL(soundURL) unique key? #243

thadeu opened this issue May 3, 2019 · 0 comments

Comments

@thadeu
Copy link

thadeu commented May 3, 2019

Problem

In my case, I have many sounds with same URL, but I would like that it was different player instance.

Today self.getSoundByURL(soundURL) get search into self.soundsByURL[soundURL] based soundURL, how to make that soundURL be unique and not side effect others player on the page?

Example:

var url = new URL(o.href)
soundURL = o.href + (url.search.length ? `&overcache=${Date.now()}` : `?overcache=${Date.now()}`)

But, when to createSound use it:

thisSound = sm.createSound({
       id: 'ui360Sound' + (self.soundCount++),
       url: removeParameter(soundURL, 'overcache'),
       ......
})
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