Video MOD Issue

before I opened this ticket

I checked the documentation and found no answer.

I checked to make sure that this issue has not already been filed.

I created a TEST and made sure the Mod is specific: I also cloned the mods to be publicly viewable

Expected Behavior

multiple Video-ModS should load within the document. currently the preview loads but the video-tag inside the modal does not .

Current Behavior

Video only loads in modal if only ONE video-mod is injected. If more video-Mods are loaded in one document , then the video content will not load inside of the modal for unknown reasons

Failure Information (for bugs)

see screenshot below. The Two pages are totally 100% the same. they are the same mods. The only difference between the two documents is that one document is only loading one Video-Mod while the other document is trying to load three Video mods .

Steps to Reproduce

https://anymod.com/projects/8P795P/settings

https://skysails-group.de/video-test-singleVideo.html

https://skysails-group.de/video-test-multipleVideos.html

user: sky
pass: group
anymod-rarkka in AnyMod’, ‘8P795P’,

Context

The error ocurres on:

Windows 10 Chrome latest version
Iphone Chrome
Android Chrome

Failure Logs

TEMPLATE MOD

this is the template mod
https://anymod.com/mod/youtube-banner-modal-lllamb

It took me more than 60 Minutes to get to this point.
At the beginning I had to falsify some mistaken assumptions.

Okay, I created this ticket WHILE I was investigating . After I finally found the root cause, I forwarded this ticket. This morning I looked into it again, and once I understood the reason for the issue , it was actually simple to solve.

There were three modals, having the same ID and the JS Code to open the modal and load the Video was also loaded three thime, due to the three vdeos.

Once I cleaned that duplication up , the Modal started to work as expected.

The issue is solved.

The AnyMod-Video-template might be improoved by providing an individual Video-ID. I would suggest to simply reuse the -IDName for the Youtube-Video. That way, two Video-MODS on the same page will no longer interfere with one another.

I did not test the consequences of duplicat JS Code, and there might be further issues elsewhere. I merely cleaned up the duplicate code.

This was the problem:

iframe id="anm-youtube"
div id="anm-modal-content"

1 Like

Thank you for giving an update!

We have fixed the original mod based on your feedback so that it can be used multiple times without causing problems.