react-native-video-player icon indicating copy to clipboard operation
react-native-video-player copied to clipboard

start in Fullscreen-Mode

Open patricktresp opened this issue 6 years ago • 4 comments

Hi,

i am not sure, if it is an issue, but i would like to start the videoplayer in Fullscreen mode without having to hit the fullscreen button. As i was looking through the extended react-native-video module, i found a method presentFullscreenPlayer();

Unfortunatly, this method is not available, when calling on the react-native-video-player reference

<VideoPlayer ref={r => (this.player = r)} … </VideoPlayer>

componentDidMount(){ if(this.player){ this.player.presentFullscreenPlayer(); } }

Is there any workaround to that or a specific policy i do not know?

Thanks,

Patrick

patricktresp avatar Mar 17 '18 08:03 patricktresp

Nobody wanting this? i tried to modify the sources to call toggleFullScreen() after it has mounted, but he reference is not available before the isPlaying State...

any hint is appreciated!

patricktresp avatar Apr 30 '18 13:04 patricktresp

Any update on this issue? Would be great if there was a fix for this !

abishekraj avatar Feb 01 '19 06:02 abishekraj

Any update on this issue?

abdulsami1105 avatar Nov 13 '19 13:11 abdulsami1105

I used a setTimeout as a workaround

function onStart(type) {
      setTimeout(() => {              
        player.current.presentFullscreenPlayer()           
      }, 500)  
  }

...

<VideoPlayer ... onStart={() => onStart()} />

henriflouquet avatar Oct 14 '22 16:10 henriflouquet