Hey, Great work!
How can I make the player start from a specific time?
Thanks =)
@msbir what URL type are you trying to play? Each player API has a different config to start at a certain time.
Thank for the response
I am trying to play youtube type
See https://github.com/CookPete/react-player/issues/115, although the config example is outdated:
<ReactPlayer
url='https://youtu.be/qv6UVOQ0F44'
config={{
youtube: {
playerVars: {
start: 33
}
}
}}
/>
Thank you!
No problem!
how can i write the config for a normal file?
how can i write the config for a normal file?
I am wondering about this too. Tried a couple of ways, for example seeking when onReady, but the player just resets played to zero.
for me as well, how I can set a starting time? seeking onStart and onReady will be start from 0 once is loaded
Thanks
how can i write the config for a normal file?
I am wondering about this too. Tried a couple of ways, for example seeking when onReady, but the player just resets played to zero.
I've found a solution that may help someone using media fragment
Media Fragments
Adding a media fragment to the media URL, you can specify the exact portion you want to play. To add a media fragment, you simply add #t=[start_time][,end_time] to the media URL
url={${source}#t=${this.state.duration * this.props.played}}
/>
I'm passing played as prop to the player component, that I retrieve from the db stored
Most helpful comment
I've found a solution that may help someone using media fragment
Media Fragments
Adding a media fragment to the media URL, you can specify the exact portion you want to play. To add a media fragment, you simply add #t=[start_time][,end_time] to the media URL
url={${source}#t=${this.state.duration * this.props.played}}
/>
I'm passing played as prop to the player component, that I retrieve from the db stored