Can anyone help me how to fetch the videos details of product in magento2 Apis
I wants display content like below screenshot in my module Api;
please find the screenshot below:
Thanks
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityCan anyone help me how to fetch the videos details of product in magento2 Apis
I wants display content like below screenshot in my module Api;
please find the screenshot below:
Thanks
We Can Load the Product Video Details By using the Below Code:
$galleryImages = $product->getMediaGalleryImages();
if ($galleryImages) {
foreach ($galleryImages as $image) {
$imageData = $image->getData();
// Check media type
if (isset($imageData['media_type']) && $imageData['media_type'] == 'external-video') {
// Your code here
}
}
}