Skip to main content
ricka59407662
Known Participant
May 14, 2024
Question

Vimeo Play Button

  • May 14, 2024
  • 2 replies
  • 859 views

I embed Vimeo videos on my family web page 4 across, 25 columns, 100 videos per page.
I am not a web designer, but surely there must be a way for a video to go full screen when
the user clicks the play button???

I have searched the internet and read how you can use Java script to do this with YouTube,
but Java is way beyond this old grandfather's pay grade. Vimeo has added lots of customizing,
so is there a way to NOT have a fullscreen button and instead just have the video play full
screen when the user clicks the play button?    https://lean-into-god.com/Stuff/Fam4.htm

    This topic has been closed for replies.

    2 replies

    BenPleysier
    Community Expert
    Community Expert
    May 14, 2024

    As an alternative to what @Nancy OShea has said, I tend to lean to a Bootstrap solution for this as can be seen here.

     

    This is the code that I have used

        <!-- MODAL FOR VIDEO -->
        <div class="modal fade" id="mdlVideo" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true" is="dmx-bs5-modal">
            <div class="modal-dialog modal-xl">
                <div class="modal-content">
                    <div class="modal-body">
                        <div class="ratio ratio-16x9">
                            <iframe title="YouTube video" allowfullscreen=""></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script>
            var videoModal = document.getElementById('mdlVideo')
        videoModal.addEventListener('show.bs.modal', function (event) {
            // Button that triggered the modal
            var button = event.relatedTarget
            // Extract info from data-bs-* attributes
            var video = button.getAttribute('data-bs-video')
            // Update the modal's content.
            var modalBodyIframe = videoModal.querySelector('.modal-body iframe')
    
            modalBodyIframe.src='https://www.youtube.com/embed/' + video + '?rel=0'
        })
    	// Stop the video playing when modal is closed
        videoModal.addEventListener('hidden.bs.modal', function (event) {
            videoModal.querySelector('.modal-body iframe').src=''
        })
        </script>
    
    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    May 15, 2024

    @BenPleysier,

    You can't ask for much more than that. It's bright, fun and provides a good user-experience. 

    Getting users to engage with content is half the battle.  Keeping them engaged is the other half.

     

     

     

     

    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    May 14, 2024

    Instead of what you have now, you need a modal (Lightbox) viewer that can support various media types (images, iframe, video, etc...).   Users click/tap on image which launches video inside a full screen modal window.  One example is Fancybox UI -- a JavaScript based api (not JAVA).  

     

    Fancybox UI is very well-documented and simple to deploy.

     

    Scroll down to VIDEO for actual examples.

    https://fancyapps.com/fancybox/

     

    Hope that helps.

     

    Nancy O'Shea— Product User & Community Expert