How-To-Integrate-Video-To-A-Product-In-Magento-2-Banner1

Video at product gallery inside product detail page is not working

Video at product gallery inside product detail page is not working, however, it is working from admin panel but on product view it is showing only video thumbnail.

Fotorama, when checking for video data, is looking for the field “video” but Magento is providing “videoUrl”.

– Maybe it is an issue of Fotorama. When Fotorama checking for video data is looking for the field “video” but Magento is providing “videoUrl”.

– Issues can be found in these files:-

var video = findVideoId(dataFrame.video, true);

When I edited the cached file to put in some console logs, I found that dataFrame did NOT contain the field  “videoUrl”.

– Please check below files:-

1) My Temporary Fix In This File:

/vendor/magento/module-product-video/view/frontend/web/js/fotorama-add-video-events.js

Copy to Clipboard

2) /vendor/magento/module-configurable-product/Block/Plugin/Product/Media/Gallery.php

Copy to Clipboard

3)  /vendor/magento/module-configurable-product/Block/Product/View/Type/Configurable.php

Copy to Clipboard

4)/vendor/magento/module-catalog/Block/Product/View/Gallery.php

Copy to Clipboard

About Author:

Nikul Prajapati

He is Magento Developer & Technical Head with 8+ years of experience. He have extensive experience in dozens of programming languages and platforms and always striving to learn more. He become a pro in Magento 1 , Magento 2, WordPress Customization, Object-oriented Programming, AJAX, PHP & JavaScript Frameworks, Content Management Systems, Conversion Of Photoshop PSD To Responsive Cross-browser Compliant HTML5/CSS3, Web Design, MySQL.

Nikul Author