=== Magic Product Video for WooCommerce ===
Contributors: GA_Drony
Tags: product video, product gallery, woocommerce, woocommerce product, woocommerce video
Donate link: https://paypal.me/agorkovenko
Stable tag: 1.3.8
Tested up to: 6.8
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: magic-product-video-for-woocommerce
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Easy, fast, and cross-browser solution for uploading videos to WooCommerce product gallery without using of external services.

== Description ==

**Magic Product Video for WooCommerce** – Enhance your **WooCommerce** product pages by adding videos directly to the product gallery. This plugin enables you to upload videos on the product editing page, which are then immediately displayed in the product gallery.

The plugin supports both **Flexslider** and **PhotoSwipe** (WooCommerce default libraries) and automatically integrates videos into the gallery. For custom gallery templates, you can easily integrate videos using the plugin’s methods.

One of the key advantages of **Magic Product Video for WooCommerce** is its built-in video conversion mechanism. By leveraging the **FFmpeg library** on the server, the plugin converts videos into cross-browser formats (MP4, WebM), ensuring high-quality playback across all browsers and platforms.

Additionally, uploading videos directly from the media library ensures fast loading and guaranteed availability for users on your site. This feature eliminates the need to wait for processing on external services, making it convenient to upload videos instantly from your phone, tablet, or computer directly to your site.

Whether you’re looking to enrich your product presentation or optimize video content for universal compatibility, this plugin offers a powerful, user-friendly solution for your WooCommerce store.

== Installation ==
= Minimum Requirements =

* PHP 7.4 or greater is required (PHP 8.0 or greater is recommended)
* WooCommerce 9.6.0 or greater is required
* FFmpeg library installed on server or hosting is recommended (5.1.6 or greater)

= Automatic Installation  =

Automatic installation is the easiest way to install the Magic Product Video for WooCommerce plugin — WordPress will handle the entire process for you, and you won’t need to leave your browser.

To perform an automatic installation of Magic Product Video for WooCommerce, log in to your WordPress dashboard, navigate to the Plugins menu, and click “Add New.”

In the search field, type \"Magic Product Video for WooCommerce\", then click \"Search Plugins\". Once you’ve found the plugin, you can view details about it, such as its release version, rating, and description. When you’re ready to install, simply click \"Install Now\", and WordPress will handle the rest.

= Manual Installation =

* Download the latest version of the Magic Product Video for WooCommerce plugin and extract the folder into the `/wp-content/plugins/` directory.
* The plugin will then appear as inactive in your Plugins menu.
* Activate the plugin through the Plugins menu in WordPress.

== Frequently Asked Questions ==
= What video formats are supported by the plugin? =

The plugin supports all video formats compatible with WordPress. However, for conversion, the following formats are accepted: MP4, MOV, AVI, MKV, HEVC, and WEBM.

= What formats are used in the video player? =

The plugin uses and assigns two video formats to each product: MP4 and WEBM.

= What video preview will be used in the gallery? =

Video previews are automatically generated from the first second of the video. If the FFmpeg library is not available, a WooCommerce placeholder will be used instead of a preview.

= Will the plugin work if the FFmpeg library is not installed on the server or hosting? =

Yes, the plugin will still work, but only with MP4 and WEBM videos added directly from the media library. In this case, no conversion to missing formats will be performed.

= Will plugin work with my theme? =

Yes, Magic Product Video for WooCommerce will work with any theme but may require some additional styling.
If you modify the product gallery display template, you will need to use the plugin’s methods to retrieve video data and display it in your custom template.

**Call method to get product video data which was saved on product edit page of admin panel**

`pvw_get_product_video_data($product_id)`

**Method return array**

`
[
  \'mp4\' => \'url_to_video_in_format_MP4_from_media_on_site\',
  \'webm\' => \'url_to_video_in_format_WEBM_from_media_on_site\',
  \'thumbnail_id\' => \'id_of_attachment_jpg_file_which_was_generated_like_cover_of_video\',
  \'SOME_KEY\' => \'url_to_video_in_original_format_if_not_same_like_mp4,_or_webm\'
]
`

== Screenshots ==
1. Display in the admin panel
2. Plugin settings page
3. Conversion process
4. Display on the website

== Roadmap ==
1. Add ffmpeg option generate thumbnail or skip
2. Use FFmpeg-web library like option
3. MPVW Library of video (big feature)
4. Pre-saved settings for FFmpeg conversion
5. CDN and outside conversion

== Changelog ==

= 1.3.8 =
* Fix field without audio for ffmpeg

= 1.3.7 =
* Fix portrait field settings
* Fix responsive style for dashboard

= 1.3.6 =
* Add option for change fill video in viewport
* Fix problem with background color in player

= 1.3.5 =
* Bugfix

= 1.3.4 =
* Support different post-types in an admin panel
* Style bug fix

= 1.3.3 =
* Add full supporting WPML translations
* Add the option to sync video between translated products

= 1.3.2 =
* Support with WPML - add option sync translations of product
* Fix warnings in plugin code
* Fix rewrite style from admin app

= 1.3.1 =
* Tested with WordPress 6.8.1
* Support WooCommerce 9.8.3
* Fix with default ffmpeg settings - when first time init

= 1.3.0 =
* Add FFmpeg user settings 🎉
* Add dashboard with FAQ
* Add translations
* Fix player volume from settings
* Fix converting original video to all required formats
* Fix multy players on page
* Disabled dark mode for setting page (will fix 1.9.x)

= 1.2.0 =
* Integrated player for proper video rendering and fine-tuning
* Added plugin settings page and component configuration
* Bugfix for incorrect video format display
* Support WooCommerce 9.8.2
* Tested with WordPress 6.8

= 1.1.2 =
* Support WooCommerce 9.6.2
* Tested with WordPress 6.7.2
* Fix translations (En)(Uk)

= 1.1.1 =
* The first stable version that automatically displays video in the product gallery of the WooCommerce theme.
