# Can Ghost uploaded videos be made fullscreen?

**URL:** <https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528>\
**Category:** Using Ghost\
**Created:** [November 7, 2023, 12:24pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528 "2023-11-07T12:24:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JD\_Roberto](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jd_roberto/32/26031_2.png) [@JD\_Roberto](https://forum.ghost.org/u/JD_Roberto)\
**Post date:** [November 7, 2023, 12:24pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/1 "2023-11-07T12:24:59Z")

</div>

If I upload a video to ghost and include it in a post, can that video be made full screen? I don’t see that option on the ghost player (what player does ghost use?)

Thanks!  
JD

---

<div class="post-metadata">

**Author:** ![JD\_Roberto](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jd_roberto/32/26031_2.png) [@JD\_Roberto](https://forum.ghost.org/u/JD_Roberto)\
**Post date:** [November 7, 2023, 6:22pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/3 "2023-11-07T18:22:13Z")

</div>

When I am making a post, the little + SIGN pops up a menu that includes VIDEO. If I upload a video to that interface it plays back. What video player is playing that back? It’s not embedded by me.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [November 7, 2023, 6:31pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/4 "2023-11-07T18:31:00Z")

</div>

It’s the native browser video player

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [November 7, 2023, 6:33pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/5 "2023-11-07T18:33:10Z")

</div>

Ghost itself doesn’t use any video player. The video gets rendered in a `<video>...</video>` [HTML tag](https://www.w3schools.com/tags/tag_video.asp), with a bit of styling around it.

Generally speaking, this is a good design choice, in my opinion, given that there are no third-party dependencies needed. So…loads quicker than loading some external library to display a video. But…yeah, it comes with the downside that there is no native fullscreen option.

There is the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API), which is supported by many browsers. You could try hack something together with that. Kinda like the solution in this thread on Stack Overvlow: [html - Is there a way to make HTML5 video fullscreen? - Stack Overflow](https://stackoverflow.com/questions/1055214/is-there-a-way-to-make-html5-video-fullscreen)

---

<div class="post-metadata">

**Author:** ![JD\_Roberto](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jd_roberto/32/26031_2.png) [@JD\_Roberto](https://forum.ghost.org/u/JD_Roberto)\
**Post date:** [November 7, 2023, 6:49pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/6 "2023-11-07T18:49:50Z")

</div>

Thanks I’ll take a look!

---

<div class="post-metadata">

**Author:** ![intellibloke](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/intellibloke/32/17829_2.png) [@intellibloke](https://forum.ghost.org/u/intellibloke)\
**Post date:** [April 22, 2024, 12:02pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/7 "2024-04-22T12:02:20Z")

</div>

Stumbled across this thread trying to make videos full screen. It appears all the player controls are implemented independently of the video element. Played around and if you insert the following html in the page it will strip all the control overlays and turn on the video controls=“true” attribute.

```auto
<script>
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('.kg-video-overlay, .kg-video-player-container').forEach(function(element) {
    element.parentNode.removeChild(element);});
  document.querySelectorAll('video').forEach(function(element) {
    element.setAttribute('controls', 'true');});
});
</script>

```

This seems to work on a few test posts i’ve done.

---

<div class="post-metadata">

**Author:** ![adevra](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/adevra/32/32470_2.png) [@adevra](https://forum.ghost.org/u/adevra)\
**Post date:** [October 5, 2024, 11:41pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/8 "2024-10-05T23:41:39Z")

</div>

This will work with themes that have page transitions between the posts.  
Also display the first frame instead of black.

```auto
<script>
function updateVideoControls() {
    document.querySelectorAll('.kg-video-overlay, .kg-video-player-container').forEach(function(element) {
        element.parentNode.removeChild(element);
    });
    document.querySelectorAll('video').forEach(function(video) {
        video.setAttribute('controls', 'true');
        video.addEventListener('loadedmetadata', function() {
            video.currentTime = 1;
        });
    });
}

document.addEventListener('DOMContentLoaded', (event) => {
    updateVideoControls();
    
    const observer = new MutationObserver(function(mutationsList, observer) {
        mutationsList.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                updateVideoControls();
            }
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
});
</script>

```

---

<div class="post-metadata">

**Author:** ![torbs](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@torbs](https://forum.ghost.org/u/torbs)\
**Post date:** [February 2, 2025, 11:00pm UTC](https://forum.ghost.org/t/can-ghost-uploaded-videos-be-made-fullscreen/42528/9 "2025-02-02T23:00:23Z")

</div>

I tried the code suggested in other contributions but either the video didn’t run properly in normal mode on phone or it had overflow on desktop. ChatGPT helped me create the following code injection which works perfectly (for now) for me:

```auto
<style>
/* Ensure video containers are responsive */
.kg-video-card video {
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    object-fit: contain;
}

/* On small screens, prevent video overflow */
@media (max-width: 768px) {
    .kg-video-card {
        max-width: 100%;
        overflow: hidden;
    }

    video {
        max-width: 100%;
        height: auto !important;
    }
}
</style>

<script>
function updateVideoControls() {
    document.querySelectorAll('.kg-video-overlay, .kg-video-player-container').forEach(function(element) {
        element.parentNode.removeChild(element);
    });

    document.querySelectorAll('video').forEach(function(video) {
        video.setAttribute('controls', 'true');
        video.setAttribute('playsinline', 'true'); // Prevents automatic fullscreen on iPhones

        // Ensure video can be played in normal mode as well
        video.addEventListener('click', function() {
            if (video.paused) {
                video.play();
            } else {
                video.pause();
            }
        });

        video.addEventListener('loadedmetadata', function() {
            video.currentTime = 1;
        });

        // Ensure proper responsiveness
        video.style.maxWidth = "100%";
        video.style.height = "auto";
    });
}

document.addEventListener('DOMContentLoaded', (event) => {
    updateVideoControls();
    
    const observer = new MutationObserver(function(mutationsList, observer) {
        mutationsList.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                updateVideoControls();
            }
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
});
</script>

```
