-
-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Labels
Bug: Needs Confirmation 🧐Bugs that are reported, but needs to be confirmed and replicated.Bugs that are reported, but needs to be confirmed and replicated.
Description
Issue description
When you Amplitude.skipTo()
to a new location for the currently playing audio, a request is being made for the URL of the audio. This happens every time you skip to a new location in the currently loaded / playing audio.
Environment
- What's My Browser Support link: https://www.whatsmybrowser.org/b/XECCG
- Amplitude.js Version: 5.3.0
Steps to reproduce the issue
- Load a song with
Amplitude.addSong({url: [url]});
- Skip to a new location with
Amplitude.skipTo(5, 0)
Every time you skip to a new location, a new request is being made by the browser for the song url.
What is expected?
I would expect a request not to be made as long as you skip within the already loaded song.
Additional details / screenshots
I can see that this happens in audioNavigation.js
and it's changeSong()
function. By setting config.audio.src = song.url
every time a skip to a new location is done, this triggers the browser to request the song url again.
By wrapping this section in a check to validate if the song url is the same, the request is avoided :
/*
Change the song if the song.url is different from the current audio.src.
*/
if (_config2.default.audio.src !== song.url) {
_config2.default.audio.src = song.url;
_config2.default.active_metadata = song;
_config2.default.active_album = song.album;
}
Metadata
Metadata
Assignees
Labels
Bug: Needs Confirmation 🧐Bugs that are reported, but needs to be confirmed and replicated.Bugs that are reported, but needs to be confirmed and replicated.
Type
Projects
Status
Being Documented