Embedded videos - changing tags in <div> code and not playing

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Mon May 02, 2016 8:46 am

Embedded videos - changing tags in <div> code and not playing

Post by ziidgaa » Wed Jun 05, 2024 6:30 pm

Hi, everything was working fine and today, I encountered this issue.
I have two websites yourmathstutor, let's call it M3 (Joomla 3, I know, I simply can't update it at the moment) and matherati, let's call it M5 (Joomla 5).

Both have my videos embedded from bunny.net and both were working fine until today. Today, I noticed, some videos (seemingly randomly) stopped working. They just don't play. It's a grey rectangle instead of a video preview and it won't start playing no matter what.

Now, both websites change the <div> codes when I use the embed code. I re-uploaded the <div> code from bunny.net today and M3 made it work (it's re-coding it to what it wants and apparently that's working), but M5 can't play it (it's re-coding it to what it wants but apparently that's wrong).

Is there anyone who can see any sense to it and tell me what on Earth shall I change on my M5 website so it's compliant and play both old and new videos again?
The M5 website had a minor update today, but M3 didn't. I did check if updated are compatible with everything - Joomla told me it is ok to update...
So I'm sure it must be something with the update but what do I need to change and where to make all videos work again? Let's see what's happening and where:

Here is an example of one video: the top is originally uploaded, the bottom is added today (it's the same video, so the code should match, but it's been edited by the website automatically)

M3: https://yourmathstutor.com/index.php/20 ... 5-17-05-21
the second vied plays
M5: https://www.matherati.com/index.php/2024-03-13-20-57-45
none plays

Here is the raw code from bunny.net
<div style="position:relative;padding-top:56.25%;"><iframe src="https://iframe.mediadelivery.net/embed/ ... nsive=true" loading="lazy" style="border:0;position:absolute;top:0;height:100%;width:100%;" allow="accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;" allowfullscreen="true"></iframe></div>

Here are the codes on M3 and M5 - both old (first) and new from today (second) so you can see what each website did with it (again, M5 currently doesn't play either, M3 plays the newly added code)

M3:
I have this on yourmathstutor and the bottom works (that's the reuploaded code from today):
https://yourmathstutor.com/index.php/20 ... 5-17-05-21

doesn't work
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... eload=true" width="300" height="150" sandbox="" allowfullscreen="allowfullscreen"></iframe></div>

works (new from today)
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... nsive=true" width="300" height="150" allowfullscreen="allowfullscreen"></iframe></div>

M5:
I have this on matherati and none works:
https://www.matherati.com/index.php/2024-03-13-20-57-45

doesn't work
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... eload=true" width="300" height="150" sandbox="" allowfullscreen="allowfullscreen"></iframe></div>

doesn't work (new from today)
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... nsive=true" sandbox="" allow="accelerometer;gyroscope;autoplay;encrypted-media;picture-in-picture;" allowfullscreen="allowfullscreen" loading="lazy"></iframe></div>

Does anyone see the pattern? I'm completely mind boggled after too long starting at it...

Also, let me show you a code of older videos (meaning the code was uploaded earlier - but it's completely the same video as the above just the code was uploaded earlier - weeks or even months ago, not today) that play on both M3 and M5:

M3 (functional - code added a while ago - the same video as above that now DOES play on this website when this code is added into a new article)
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... eload=true" width="300" height="150" allowfullscreen="allowfullscreen"></iframe></div>

M5 (functional - code added a while ago - the same video as above that now DOESN'T play on this website when this code is added into a new article)
<div style="position: relative; padding-top: 56.25%;"><iframe style="border: 0; position: absolute; top: 0; height: 100%; width: 100%;" src="https://iframe.mediadelivery.net/embed/ ... eload=true" width="300" height="150" sandbox="" allowfullscreen="allowfullscreen"></iframe></div>


Thank you.

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Mon May 02, 2016 8:46 am

Re: Embedded videos - changing tags in <div> code and not playing

Post by ziidgaa » Wed Jun 05, 2024 6:45 pm

Oh, right... I just possibly found the issue - it's the bloody forced sandbox.
viewtopic.php?t=1008580
I'm now trying to use one of the fixes...

User avatar
Slackervaara
Joomla! Ace
Joomla! Ace
Posts: 1124
Joined: Sat Aug 13, 2011 6:27 am

Re: Embedded videos - changing tags in <div> code and not playing

Post by Slackervaara » Mon Jun 17, 2024 5:55 pm

After the recent upgrades of JCE, I have not been able to embed Sweden's Radio program on the site via Iframe. It worked just fine before. I suspected the Sandbox was causing this. Went to JCE >Profile>Default>Plugin Parameter>Media Support> Change Sandbox Iframes to No. Then it works as before.

User avatar
Slackervaara
Joomla! Ace
Joomla! Ace
Posts: 1124
Joined: Sat Aug 13, 2011 6:27 am

Re: Embedded videos - changing tags in <div> code and not playing

Post by Slackervaara » Tue Jun 18, 2024 10:23 am

Prior to change in JCE settings I could under a period change:sandbox="" to sandbox="allow-scripts" and it worked for a period but not after latest upgrade of JCE. The original poster mentions sandbox="" did not work for him.


Post Reply

Return to “General Questions/New to Joomla! 5.x”