=== AddonLogic VideoVault WP ===
Contributors: snehalpancholi
Tags: video gallery, youtube gallery, vimeo gallery, video playlist, custom post type
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Native WordPress video gallery with oEmbed support, auto-thumbnail fetch, AJAX load more, lightbox player, and a playlist layout. No file hosting required.

== Description ==

VideoVault WP stores each video as a custom post type (`videovault_video`) with a URL or a self-hosted file from the media library. The plugin auto-fetches and stores the oEmbed thumbnail on save so your gallery has real preview images without manual work.

**Key features:**

* Custom post type with `video_category` taxonomy (playlists)
* Paste any oEmbed URL — YouTube, Vimeo, Wistia, Dailymotion, and more
* OR choose a self-hosted video file from the WordPress media library
* Auto-fetches and saves the oEmbed thumbnail as the featured image on save
* "Refresh Thumbnail" button in the edit screen for manual re-fetch
* `[video_gallery]` shortcode with seven attributes including `layout`
* Grid layout: cards with thumbnail + play overlay → full lightbox player
* Playlist layout: featured player + scrollable sidebar list, click swaps video without closing
* AJAX Load More for grid layout — no page reloads
* Three aspect ratios: 16:9, 4:3, 1:1
* Responsive — sidebar becomes a horizontal scroll strip on mobile
* Lazy-load thumbnails
* Zero jQuery, no external libraries

== Installation ==

1. Upload the `video-vault-wp` folder to `/wp-content/plugins/`.
2. Activate **AddonLogic VideoVault WP** in the Plugins screen.
3. Go to **VideoVault → Categories** and create your first category.
4. Go to **VideoVault → Add Video**, paste a video URL or choose a media file, set a title and category.
5. Embed a gallery with `[video_gallery]` on any page or post.

== Shortcode Usage ==

`[video_gallery]`

| Attribute | Values | Default | Description |
|-----------|--------|---------|-------------|
| category | slug | (all) | Filter by category |
| columns | 1–4 | 3 | Columns in grid layout |
| count | number | 9 | Videos per page (grid) |
| ratio | 16x9 / 4x3 / 1x1 | 16x9 | Aspect ratio |
| autoplay | true / false | false | Autoplay in lightbox |
| lazy | true / false | true | Lazy-load thumbnails |
| layout | grid / playlist | grid | Display layout |

Examples:

`[video_gallery category="tutorials" columns="3"]`

`[video_gallery layout="playlist" ratio="16x9"]`

`[video_gallery columns="2" count="4" autoplay="true"]`

== Frequently Asked Questions ==

= Will my gallery break if I change themes? =
No. Videos are stored as a custom post type in the WordPress database — independent of any theme.

= Can I mix YouTube and Vimeo videos in the same gallery? =
Yes. Each video has its own URL. Any combination of providers works in the same category.

= What happens if the thumbnail fetch fails? =
A placeholder is shown. You can re-fetch at any time using the "Refresh Thumbnail" button in the video edit screen.

= Can I use self-hosted videos? =
Yes. In the Video URL metabox, click the "Media Library" tab and select any uploaded video file.

= Does the playlist layout support Load More? =
No. The playlist layout fetches up to 50 videos upfront for the sidebar. Load More is a grid-layout feature.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Screenshots ==

1. Video edit screen — paste a URL or choose from the media library.
2. Admin list table with auto-fetched thumbnail column.
3. Grid gallery output — 3 columns with play overlay hover.
4. Lightbox player — opens in-page with no page reload.
5. Playlist layout — featured player on the left, scrollable sidebar on the right.
6. Settings page with shortcode reference.
