# Phaser fullscreen latest news for safari?

**URL:** <https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290>\
**Category:** Phaser 3\
**Created:** [May 11, 2020, 2:25pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290 "2020-05-11T14:25:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gio\_nole](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gio\_nole](https://phaser.discourse.group/u/gio_nole)\
**Post date:** [May 11, 2020, 2:25pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/1 "2020-05-11T14:25:20Z")

</div>

Hi @samme and everyone…

I am using

`this.game.scale.startFullscreen();`

This works fine on chrome/firefox. But on Mac safari, it says `fullscreen failed` . I am starting to wonder why this happens, because in the docs, it says that this function uses plain `Fullscreen API`. So By looking at `FullScreen API`, it’s possible to go into fullscreen via prefix such as `webkitRequestFullscreen` on safari.

1. Does this mean that phaser’s `startFullScreen` doesn’t use prefixes at all and just uses `FullScreen API` without prefixes?

2. If that’s so, what do I do to make it work on mac/ios safari ?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [May 11, 2020, 3:25pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/2 "2020-05-11T15:25:23Z")

</div>

> [@gio\_nole](#):
>
> But on Mac safari, it says `fullscreen failed`

That sounds like the browser refused to start fullscreen.

---

<div class="post-metadata">

**Author:** ![gio\_nole](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gio\_nole](https://phaser.discourse.group/u/gio_nole)\
**Post date:** [May 11, 2020, 3:32pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/3 "2020-05-11T15:32:16Z")

</div>

@samme

Yeah, so What i mean is I am using

```javascript
this.game.scale.on('fullscreenfailed', () => {
            console.log("Full Screen Failed");
   })

```

So this is what gets called on Mac Safari. But the question is why? If I use `elem. webkitRequestFullScreen()` , full screen works just fine on Mac Safari …

I am wondering what Phaser’s `startFullScreen()` does and if it’s using vendor prefixes for different browsers.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [May 11, 2020, 3:50pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/4 "2020-05-11T15:50:01Z")

</div>

I would focus on how you’re calling [startFullscreen](https://photonstorm.github.io/phaser3-docs/Phaser.Scale.ScaleManager.html#startFullscreen()).

If Safari is refusing to start fullscreen, it doesn’t matter which un/prefixed method is used.

---

<div class="post-metadata">

**Author:** ![gio\_nole](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gio\_nole](https://phaser.discourse.group/u/gio_nole)\
**Post date:** [May 11, 2020, 3:51pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/5 "2020-05-11T15:51:00Z")

</div>

I am calling it like this:

`this.game.scale.startFullscreen();`

What else should be there to call this differently?

---

<div class="post-metadata">

**Author:** ![Darko](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/darko/32/3335_2.png) [@Darko](https://phaser.discourse.group/u/Darko)\
**Post date:** [May 11, 2020, 5:48pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/6 "2020-05-11T17:48:01Z")

</div>

I don’t have a Safari to check, but you could test this example…

> **[Phaser - Examples - Full Screen Game](https://phaser.io/examples/v3/view/scalemanager/full-screen-game)**
>
> Desktop and Mobile HTML5 game framework. A fast, free and fun open source framework for Canvas and WebGL powered browser games.

I guess browsers don’t ike “auto-fullscreen” for security reasons or under some conditions.  
Just some ideas:

- Try using anything interactive to launch the fullscreen (button ?)
- If you are using an iframe try “allowfullscreen” prop

---

<div class="post-metadata">

**Author:** ![gio\_nole](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gio\_nole](https://phaser.discourse.group/u/gio_nole)\
**Post date:** [May 11, 2020, 5:57pm UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/7 "2020-05-11T17:57:17Z")

</div>

This doesn’t work on safari.

Funny thing is If i use `FullScreen Api` directly, It works even on safari. 😃

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [May 12, 2020, 1:01am UTC](https://phaser.discourse.group/t/phaser-fullscreen-latest-news-for-safari/6290/8 "2020-05-12T01:01:30Z")

</div>

Phaser uses the prefixed names if necessary. You can look in `game.device.fullscreen`.
