Hey Magento Folks,
If you haven't bookmarked our Magento tutorial link yet, do it now! You can find all the important guides and code solutions for Magento 2 in this category. Click here -> Magento Tutorials or You can also be subscribed to our push notification to never miss an update.
Today We are going to learn how you can add or upload a video for products in Magento 2.
In Magento 1, product video feature wasn't available in default Magento, you need to use the third-party extension but in Magento 2 it now defaults Magento feature.
Using the YouTube API key, you can display or set your youtube video for a product view to be shown in the product image/gallery section.
Get Your Youtube API key:
- Go to Google Developer Console and login
- Click on library from left menu and search for youtube API.
Select Youtube Data API v3. - Click on it and Click Enable.
- Now click on Credentials from left
- Click on API key option
- You will see API key generated in a popup
- Copy the key and store it safe place, we need to use it in magento backend,
- If you want to restrict the access this API by IP or something, click on Restrict key otherwise click on close to close the popup. By the way restricting key is a good option to prevent unauthorized use and quota theft. You can restrict it by websites, IP addresses, or applications can use your API key.
more: https://magecomp.com/blog/upload-product-videos-magento-2/