React-native-video: Closing fullscreen onEnd

Created on 11 Oct 2017  路  3Comments  路  Source: react-native-video/react-native-video

I want to close the fullscreen player onEnd

I tried two approaches.

Calling presentFullscreenPlayer() in the onEnd handler, which did nothing.

Setting a playing state to false in the onEnd handler causing the <Video> component not to be rendered anymore, which showed a black screen that forces me to restart the app.

Most helpful comment

Crawling through the code I found the undocumented dismissFullscreenPlayer method.

The _toggle_ in the docs implied I could use presentFullscreenPlayer for enabling and disabling the player. I fixed this in the docs.

All 3 comments

Crawling through the code I found the undocumented dismissFullscreenPlayer method.

The _toggle_ in the docs implied I could use presentFullscreenPlayer for enabling and disabling the player. I fixed this in the docs.

@kay-is You saved my life!

Thanks for updating the docs.

Was this page helpful?
0 / 5 - 0 ratings