Comments 4Informatica Neurovilla started the conversationApril 27, 2021 at 9:34amHello there!I'm facing certain problems using the background videos feature, due to the autoplay failing to start the video in some tries. I'd like to know if possible, which PHP or JS file generates the iframe's embedded code for the final HTML file.Thank you very much! 279Noah repliedApril 27, 2021 at 9:49amHi there,Thanks for reaching out.Please look into these Video Troubleshooting Tips: http://themenectar.com/docs/salient/page-builder-row/#video-background ?. Thanks 4Informatica Neurovilla repliedApril 27, 2021 at 10:05amThank you for the fast answer!The documentation has partially solved my problem, since I'm still looking for the .PHP or .JS files which generate the iframe's HTML code used for showing the video on the final page. 4Informatica Neurovilla repliedApril 27, 2021 at 10:16amThe reason why I'm looking for those files, is because the autoplay keeps failing sometimes to play the content automatically. 4Informatica Neurovilla repliedApril 27, 2021 at 10:39amFound that init.js located within themes/salient/js/init.js is the script in charge of creating the youtube video player. 4Informatica Neurovilla repliedApril 27, 2021 at 10:40amAlso, it seems that after adding some code to handle the event 'onStateChange' it will now autoplay the video without any problems:'onStateChange: function(event) { if (event.data == YT.PlayerState.CUED) { event.target.playVideo(); event.target.setLoop(!0); event.target.setVolume(0); event.target.mute(); } }'Ticket can now be closed.2 Likes Sign in to reply ...
Hello there!
I'm facing certain problems using the background videos feature, due to the autoplay failing to start the video in some tries.
I'd like to know if possible, which PHP or JS file generates the iframe's embedded code for the final HTML file.
Thank you very much!
Hi there,
Thanks for reaching out.
Please look into these Video Troubleshooting Tips: http://themenectar.com/docs/salient/page-builder-row/#video-background ?.
Thanks
Thank you for the fast answer!
The documentation has partially solved my problem, since I'm still looking for the .PHP or .JS files which generate the iframe's HTML code used for showing the video on the final page.
The reason why I'm looking for those files, is because the autoplay keeps failing sometimes to play the content automatically.
Found that init.js located within themes/salient/js/init.js is the script in charge of creating the youtube video player.
Also, it seems that after adding some code to handle the event 'onStateChange' it will now autoplay the video without any problems:
'
onStateChange: function(event) {
if (event.data == YT.PlayerState.CUED) {
event.target.playVideo();
event.target.setLoop(!0);
event.target.setVolume(0);
event.target.mute();
}
}
'
Ticket can now be closed.