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

Changing the audio.currentTime has weird side effects #12

Merged
merged 1 commit into from
Jan 28, 2014

Conversation

thom4parisot
Copy link
Contributor

For some reasons, some timeframes move the cursor to a different position as the requested one.

var a = document.querySelector('audio')
a.currentTime = 6;

player_time_update at 6
player_time_update at 5.990748
player_time_update at 5.979138
player_time_update at 5.967528
player_time_update at 5.955918
player_time_update at 5.944308
player_time_update at 5.932698
player_time_update at 5.921088
player_time_update at 5.909478
player_time_update at 5.897868
player_time_update at 5.886259 

@thom4parisot
Copy link
Contributor Author

This is related to bbc/waveform-data.js#7 and bbc/waveform-data.js#8

Floating number conversion is creating an undesired playhead move.

@thom4parisot
Copy link
Contributor Author

The actual problem is a waveform_seek is triggered in waveform.zoomview, and due to the above problem, the playhead is moved again because of a audioElement.currentTime update.

 The multiple playhead is due to the floating precision rounding issues.
thom4parisot pushed a commit that referenced this pull request Jan 28, 2014
`element.currentTime` side-effect
@thom4parisot thom4parisot merged commit 3ecf0ef into master Jan 28, 2014
@thom4parisot thom4parisot deleted the fix-12-currentTime branch January 28, 2014 15:46
thom4parisot added a commit that referenced this pull request Jan 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant