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

How to seekTo on componentDidMount #21

Open
xpluscal opened this issue Dec 6, 2016 · 1 comment
Open

How to seekTo on componentDidMount #21

xpluscal opened this issue Dec 6, 2016 · 1 comment

Comments

@xpluscal
Copy link

xpluscal commented Dec 6, 2016

Hi,

I'd like to seekTo a certain time when my Media component ist loaded.
I do not use a custom player, but this:

export default MediaPlayer = withMediaProps(withMediaPlayer(MediaPlayer));

and inside the MediaPlayer component I use this to seekTo the time set via Redux:

componentDidMount(){
    let that = this;
    if(this.props.startTime && this.props.media){
      that.props.media.seekTo(that.props.startTime);
    }
  }

Any ideas what could be wrong?
Thanks

@souporserious
Copy link
Owner

Sorry, I just saw this issue. Can you provide anymore code? Maybe the whole component so I can get an idea of what's going on? I've been thinking about adding a startTime prop or something similar to define when the video should start playing similar to how Youtube allows you to set a start time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants