How to access seek()? Refs don't appear to be returned.
See original GitHub issueI am trying to get a reference to my player by passing ref={component => this._videoPlayer = component}
to it but that doesn’t appear to ever be called so I don’t have a reference to the component to call .seek() on.
if (!!this._videoPlayer) {
this._videoPlayer.seek(val);
}
Is the ref functionality broken or am I misunderstanding how I should call seek()?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
How to access seek()? Refs don't appear to be returned. #298
I am trying to get a reference to my player by passing ref={component => this._videoPlayer = component} to it but that doesn't appear...
Read more >Unable to access $refs in component method - Stack Overflow
When clicking the "Click me" element, the console logs show that the $refs of the component element are inaccessible. I think this might...
Read more >Python File seek() Method - W3Schools
Python File seek() Method The seek() method sets the current file position in a file stream. The seek() method also returns the new...
Read more >How to use Goal Seek in Excel for What-If analysis - Ablebits
The tutorial explains how to use Goal Seek in Excel for What-If analysis: get the desired formula result by changing an input value....
Read more >Unavailable or Problem References? What You Can Do - ALIS
Call the company where your reference used to work and ask if they have new contact details. Some companies won't give out home...
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
Wrapping the Video component in a View component did seem to make the ref work. I don’t understand it at all, but it worked.
Get rid of the view between the TouchableHighlight and Video and Ref no longer works. Strange.
Just a note since I came across this looking for seek usage examples. Refs seem to work now. I’m using RN 0.33. The code below works and is based on the example VideoPlayer class: