First of all I’m using wordpress with elementor plugin and the accordion feature.
I’ve got a code of video player:
<div id="player_div"></div><script src="https://lnaff.pl//API_VIDEO/LOCKER/js.js"></script><script> var ustawienia = {element_id:"player_div",
wysokosc:"455",
szerokosc:"800",
skin:"1",
czas_blokady:"19",
dlugosc_filmu:"2589",
video_url:"http://androidapkmodpro.com/wp-content/uploads/2020/01/Intro.mp4",
video_img:"https://i.imgur.com/YvKvkYL.png",
stream:"0",
programy_url:["https://leadnet.pl/p_uri/q6pYwlgb27QyvVjdPke1/x1vo6wa/?parametr=",],
player_button:["https://i.imgur.com/ACzzOnz.png",],
}; LEADNETWORK_generuj_player(ustawienia);</script>
I need to put in on several places on the same page. When I tried just multiple copy->paste, only in one place is showing. Is it possible? Any advices?
2
Answers
Please take a look at first line:
It says basically that the video is put into a div with
id=player_div
due toelement_id:"player_div"
. If you change the first line to something like:it’s highly probable that it would work.
If you copy and paste this code in multiple locations you will load the code and declare the same variables twice, which for Javascript won’t work. The “ustawienia” variable is also pointing to the player_div, and with HTML id’s this will only find the first one.
Now I’ve not used the lead network video player, but this should work without issue. For each new video, you would need to create a new target DIV tag and a new video variable in the script section.
Hope this helps.