How to show video by embed code?

i use the video element on a section and in this i call the video by acf


but on the front end the video is not showing on any product . can you pls look into it. and help me out.
details in secure note

Hi Ketan,

Thanks for reaching out.
It seems that the Dynamic Content code is returning the video code itself and it is not needed to add to the Modal. I would suggest you add the following code into the Text element and check if that works for you or not.

 {{dc:acf:post_field field="product_resource_video"}}

Thanks

but i want that design so i used the modal but inside that modal the video element is not showing the video why?


it shows the video preview but not playing the video why?

Hi Ketan,

For that, you can ask the author or provider of the embed code you are using here.

Thanks

embed code is correct and video is playing on other video element . only on this modal the video is not playing why? can you please once again check this

video is playing by acf field can you fix this. ASAP

Hey Ketan,

Which button I click to launch the Modal and play the video? At the moment, when I click on this, the modal launches and play the video:

Best Regards.


you can see that their is a section in which i use the same acf code but video is not playing.

Hello Ketan,

Your video embed code is:

<script src="https://ehob.wistia.com/medias/7mwl3ehj34" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_responsive_padding" style="padding: 56.25% 0 0 0; position: relative;">
<div class="wistia_responsive_wrapper" style="height: 100%; left: 0; position: absolute; top: 0; width: 100%;"><span class="wistia_embed wistia_async_7mwl3ehj34 popover=true popoverAnimateThumbnail=true videoFoam=true" style="display: inline-block; height: 100%; position: relative; width: 100%;"> </span></div>
</div>

You may be having a mixed content issue which is why the video is not playing. Please contact Wistia for further assistance on why your video is not playing when using their embed code. You may ask them if it is possible to place there video inside a Modal element.

Best Regards.

@vks_group – ran into this awhile back with Wistia myself. Do you happen to have the Dynamic Rendering toggle enabled on the modal? For some reason Wistia’s embed doesn’t like that.

If you disable Dynamic Rendering, the embed will work. However, without that feature active the video will not stop playing when the modal is closed.

Dynamic rendering works fine with all of the other major embeds (YT and Vimeo).

Hello Ketan,

I will forward this thread to @Charlie, our developer because this is the first time we encountered an embedded video hosted by Wistia. We must look into this to figure out if this is a bug or just a conflict between the dynamic rendering and Wistia-hosted videos.

Please bear with us.

I would try using their iframe embed instead of the script and div setup. For both options try moving the script tag outside the modal in a “Raw Content” element that is at the bottom of your page, otherwise it’ll get loaded multiple times when in “Dynamic Rendering” mode. The problem with the div setup, is that unless their script is detecting page changes (which most scripts don’t) then it won’t work when their div is added to the page through the modal. Let us know if this helps and have a great day.

Hello Charlie,
Thanks for your help & clarification.
In my case to open a video in the modal is my need. I can’t add that video in simple raw content element or div. To enhance the design and accessibility I need to use the modal section there and to open a video in that.
I don’t know what’s wrong on this page because the same section is I’m having on my home page and there too I’m opening a video in modal. On that page it is working fine but here on the single product page layout it is not. And here I need to call the video via ACF field as my all products have their own video to show.
Please suggest me a way around to do this or any solution. It’s an urgent scenario to solve it as soon as possible.

I see you have the modal video working now with an iframe. Are we all good here? I’ll post the page I was looking at. Is there another page this isn’t working on?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.