question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fullscreen error

See original GitHub issue

Current Behavior

In chrome dev tools - mobile emulation I get

caught (in promise) TypeError: fullscreen error

Environment

  • URL attempting to play: www.greatstate.co
  • Browser: Chrome
  • Operating system:

Other Information

“gatsby”: “2.7.5”, “react-player”: “^1.14.2”,

My player code looks like


     <ReactPlayer
        ref={videoRef}
        className={css.reactPlayer}
        url={url}
        width="100%"
        height="100%"
        muted
        playing
        loop
        controls={false}
        onDuration={duration => {
          handleDuration(duration)
        }}
        onReady={() => {
          setVideoIsReady(true)
        }}
      />

I have trieda few vimeo config options

vimeoConfig={{ iframeParams: { fullscreen: 0 } }}

and

vimeoConfig={{ playerOptions: { fullscreen: 0 } }}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
maddyahmadcommented, Apr 6, 2022

Thanks, that worked for me. Even though I have to add vimeo in configuration. Now my react player looks like :

<ReactPlayer
className="react-player"
style={{ pointerEvents: "none" }}
url={roundThreeVideo}
pip={true}
stopOnUnmount={false}
onEnded={() => roundThreeQuiz()}
playing
config={{
vimeo: {
playerOptions: {
playsinline: true,
},
},
}}
/>
1reaction
Franofarioncommented, Apr 5, 2022

@maddyahmad I don’t know if it’ll help you this may fix it

playerOptions: {
  playsinline: true
}

According to the Vimeo API documentation on playsinline attribute :

Whether the video plays inline on supported mobile devices. To force the device to play the video in fullscreen mode instead, set this value to false.

Therefore I forced it to true, and it fixed it.

It also fixed an other issue I had, on mobile emulation on chrome, while I push pause / play button, it triggered the fullscreen mode.

my code :

<ReactPlayer
    url={videoUrl}
    controls={true}
    width='100%'
    height='100%'
    className={classes.videoPlayer}
    playing
    config={{
      playerOptions: {
        playsinline: true
      }
    }}
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Document: fullscreenerror event - Web APIs - MDN Web Docs
The fullscreenerror event is fired when the browser cannot switch to fullscreen mode. As with the fullscreenchange event, ...
Read more >
fullscreenerror Event - W3Schools
The fullscreenerror event occurs when an element can not be viewed in fullscreen mode, even if it has been requested. Note: This event...
Read more >
Javascript request fullscreen is unreliable - Stack Overflow
Another unexpected issue with requestFullscreen() is that parent frames need to have the allowfullscreen attribute, otherwise Firefox outputs ...
Read more >
TypeError: fullscreen error · Issue #122 · sindresorhus/screenfull
Hi, I get this error: TypeError: fullscreen error at Object. (/js/trainer_scripts.js:3176:1323) at new Promise ( ) at Object.request ...
Read more >
Document.fullscreenerror Event - Web APIs - W3cubDocs
The fullscreenerror event is fired when the browser cannot switch to fullscreen mode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found