Skip Navigation

[Resolved] Embedded videos are not displayed in chrome inside the custom fields

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user is using and embed from vimeo in the middle of the page. In Chrome Desktop the embed displays at the top of the page.

Solution:
This was caused by a CSS rule in the child theme, once removed the issue was resolved.

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 9 replies, has 2 voices.

Last updated by jasonL-10 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#2210111

Hey,

Hope you are well. Some embedded videos are not displaying properly on Chrome browser(desktop) and also are not playable.
Use these credentials to enter the course :
(Edit: Credentials moved to private reply)
URL where you can see the issue: hidden link
How to recreate:
Go to HOMEWORK + BONUSES section using the URL and credentials above.
Click on Bonus named "Where Ziva Comes From" video.
The iframe is in place but the video is displayed on the top of the page...
Those videos are implemented using the Toolset Custom Fields feature

Videos are not embedded ToolSet Custom fields feature work

Thank you

#2210121

/Hello and thank you for contacting Toolset support.

I compared this between Chrome on my Desktop and Samsung browser on my mobile, and I can see that the embed jumps to the top of the page when the collapsible tab is opened.
To further analyze this issue, I would like to get access to your website and check how this is built. Can you provide an administrator account for me? Your next reply will be private to let you share credentials safely.

Regarding the autoplay, this is a known issue for Chrome on desktops, you need to make the view muted to autoplay it. Check this article hidden link

#2210641

Unfortunately, the credentials did not work for me. Can you double-check from your side and update the credentials in your next reply?

#2212117

Thank you for the credentials. Unfortunately, I could not find where the collapsible tab is built. There is no content template for the Lessons posts type. And I could not find where it is defined?

Is it defined in the Astra custom layouts? Can you share a URL where we can edit the collapsible or the embedded video?

#2212233

Hey,

Thank you for your reply.
Yes, it is defined inside Astra (out theme) custom layouts (Lessons Extra Credit)
See link below:
hidden link

Thank you,
Svetlana

#2212661

Thank you Svetlana. I could not yet find the cause of this issue. Let me approach our 2nd Tier team for assistance and get back to you asap.

#2212841

Thanks a lot for your help, Jamal

#2215037

Our 2nd Tier team has debugged this issue a bit further and we highly think this is a possible bug in Chrome in Desktop.

This works fine in other browsers and if we use the browser dev tools to inspect the DOM and styling, there is nothing that can explain the position of the video at the top of the screen. When you examine the style attributes of the relevant area of the DOM, the iframe is absolutely positioned with top=bottom=left=right=0, which means that it should occupy the space of the container div. That is what happens in other browsers, but not in Chrome.
In other browsers we can make updates to the style rules to move the position of the video, but the same doesn’t work in Chrome, the position of the video is not determined by the style rules applied and cannot be moved by making changes to them.

It appears the element containing the video with absolute positioning has lost track of its context somehow, and hence is positioned at the top left. Why might that happen?
We suspect this bug occurs because at the time the video is inserted it is hidden within a closed accordion and is not being displayed. But I run two different tests and that does not seem the issue:
- First, I made the content of the accordion appear by adding the class "open" to it. But the issue was still reproduced.
- Second, I placed the iframe, hardcoded, before the accordion and the issue was still reproduced.

Unfortunately, this is a very hard issue to reproduce. I tried to reproduce as minimally as possible, with only a few Javascript files that may be relevant, here hidden link
The issue is not reproduced.

I wanted to check if the issue will still be reproduced without Toolset plugins, but I can't deactivate Toolset Types, because the custom layout templates use some Toolset APIs(types_render_field, types_child_posts). Deactivating Toolset Types will cause fatal errors, but we can still adapt the code to reproduce the issue without Toolset plugins.

I digged a bit more into it and tried a youtube embed and I could narrow the issue down to this CSS rule that comes from this file hidden link

.bonus-listing, #lesson-homework ol {
    -webkit-column-count: 1;
    -moz-column-count: 1;
    column-count: 1;
}

Once we deactivate this rules the embeds display as expected, check this screenshot hidden link

This being said, I suggest that you reach out to your child theme's developer, and/or to the vimeo support for assistance, I am sure one of them can help narrow this issue down and fix it for Chrome Desktop.

#2217211

Hey,

Thank you very much for noticing that!
We removed the code and the videos are back in place!

Have a nice rest of the week,
Svetlana

#2217213

My issue is resolved now. Thank you!