Ability to set start position for audio and video elements
See original GitHub issueProposed API:
st.audio(data, format="audio/wav", start_time=0)
st.video(data, format="video/mp4", start_time=0)
The reason start_time
goes at the end is because it’s less likely people will want to set that arg than the format
arg.
There was also some discussion about calling it “current_time” vs. “start_time”, but we decided on the latter because “current_time” just sounds confusing in this context. Sure we’re using the HTML currentTime
property under the hood —but while that name makes sense as a dynamic property you can read/write in JS, it does not make sense as a static property that you only set once.
API status: ready to implement
The MDN entry for <audio>
element shows you can easily do this by setting the currentTime
attribute.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Setting HTML5 audio position - Stack Overflow
To jump around an audio file, your server must be configured properly. The client sends byte range requests to seek and play certain...
Read more >The Embed Audio element - HTML - MDN Web Docs - Mozilla
To get a consistent look and feel across browsers, you'll need to create custom controls; these can be marked up and styled in...
Read more >Position targeting - Display & Video 360 Help
Position targeting allows you to control where your ads will appear relative to other content, whether it's text on a webpage or within...
Read more >10 Advanced Features In The HTML5 <video> Player
Specifying multiple sources for a video; Showing or hiding the video player's controls; Start or stop the video at a certain point or...
Read more >4.8.6 The video element — HTML5 - W3C
The src , preload , autoplay , loop , and controls attributes are the attributes common to all media elements. The audio attribute...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I read updated issue body and your new comment on the PR. While developing, I was thinking like you, but the issue body was different so I respect it. But finally it’s OK and I’ll do them.
Merged into develop, so closing as complete. Thanks @mrunderline !