Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #142804
    Neal B
    Guest

    I have the same question as this post – https://www.boldgrid.com/support/question/is-there-a-plugin-that-only-auto-plays-1-video-at-a-time/ – specifically, “if someone plays one video and then opens another video, the first video stops playing.”

    Brandon C replied, “I know with our products this functionality is built directly into the Post and Page Builder plugin.”

    Would someone please elaborate on this as I can’t find a setting for it anywhere?

    #142868
    Brandon C
    Keymaster

    Hi Neal,

    Thanks for reaching out!  If you’re using the BoldGrid Post and Page Builder “Video” block element by default it should only play one embedded video at a time.  If this isn’t the case for you can you link us to the page where the issue is occurring so that we can have a look?

    We look forward to assisting you further with this Neal!

    #142872
    Neal B
    Guest

    I’ve been using the iFrame embed codes from bunny.net – page still in progress: https://www.flyasakite.com/portfolio/

    I couldn’t figure out how to embed videos using the Video block. Maybe I was using the wrong URL, but it just created a link instead of embedding when I tried to use the “Insert from URL” option.

    So, I’d be thrilled with one of two solutions – 1) a way to work with the iFrame embeds to prevent simultaneous play, or 2) a way to embed by bunny.net videos using the Video block. Or 3), I guess, which is an entirely different solution. What do you think?

    #142905
    Brandon C
    Keymaster

    Hey Neal,

    Thanks for the additional details. Ultimately, I’d recommend the native builder because we directly support it and I’m positive this functionality is available.  With that being said I understand you’ve already put a lot of work into the bunny.net method and you may not wish to change it.  Here’s how I would approach both scenarios:

    1. Prevent Simultaneous Play with iFrame Embeds

    To stop multiple iFrame videos from playing simultaneously, you’ll need to add JavaScript that pauses the first video when another one starts. Here’s how to implement this:

    • Add the following script to your Crio customizer under the Custom CSS/Js Editor (js), which will ensure only one video plays at a time:
      html
      <script>
      document.addEventListener('play', function(e) {
      var videos = document.getElementsByTagName('video');
      for (var i = 0, len = videos.length; i < len; i++) {
      if (videos[i] !== e.target) {
      videos[i].pause();
      }
      }
      }, true);
      </script>
    • This code will apply to all <video width="300" height="150"> elements on the page, so any active video will automatically pause if another one starts.

      2. Using the BoldGrid Video Block

      If you’d prefer to use the Video Block in the BoldGrid Post and Page Builder, here’s how to ensure proper embedding with bunny.net:

      • Insert a Video Block:
        1. In the Post and Page Builder, click Add Block > Media > Video Block.
        2. Use the “Insert from URL” option, but ensure you’re using the correct video URL format from bunny.net.
      • If the embed is creating just a link instead of an embedded video, make sure:
        • The URL you’re inserting is directly accessible by browsers as an embed source. Bunny.net should provide a specific embed URL for video hosting.

      I hope this helps Neal!

       

    #143262
    Neal B
    Guest

    Brandon, I appreciate you helping me through this! It’s surprisingly difficult to figure out, and I think we’re getting close.

    I would like to get your option #1 to work. Option #2 would be fine, but no matter which URL I paste in (Bunny.net streamed videos have HLS Playlist URL and Direct Play URL), it shows as a link. The Video Block -> Insert from URL has a Link Text box as if it’s only meant to provide a link, but maybe I’m doing it wrong.

    As for option #1, you said, “This code will apply to all <video width=”300″ height=”150″>,” but none of my iframes have the video tag, and I don’t know how/where to add it. I did add the JS code successfully.

    #143271
    Brandon C
    Keymaster

    Thanks Neal,

    It should pull those tags from the iframe meta data. We’d likely need to inspect your code directly to give you more clear solutions.  I see you’re a BoldGrid Premium subscriber, which means you have access to our BoldGrid Premium support via your BoldGrid Central account (help section).

    If you reach out with this request to premium we can access your website with your permission and address your concern directly.  This will allow us to properly inspect the configuration and embed code from Bunny.

    We look forward to assisting you further with this!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How do I play one embedded video at a time in Post and Page Builder?’ is closed to new replies.