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
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.
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;
}
The text was updated successfully, but these errors were encountered:
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
Steps to reproduce the issue
Amplitude.addSong({url: [url]});
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'schangeSong()
function. By settingconfig.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 :
The text was updated successfully, but these errors were encountered: