=== MEYDY Reel Studio ===
Contributors: meydy
Tags: audio player, secure streaming, music portfolio, audio reel, musician
Requires at least: 6.2
Tested up to: 7.0
Stable tag: 1.8.13
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Secure audio reel pages with signed streaming URLs, waveform visualization, visit analytics, and personal share links.

== Description ==

**MEYDY Reel Studio** lets music composers, sound designers, DJs, and audio professionals create private, branded audio reel pages — hosted entirely on their own domain, with no dependency on external streaming platforms.

Share your music securely with clients, labels, and collaborators. Your reel lives at your URL, under your brand, and your audio files are never exposed.

= Core Features (Free) =

* **Reel management** — Create, edit, duplicate, and delete audio reels from a dedicated admin screen.
* **Signed streaming URLs** — Audio files are served through short-lived, HMAC-signed tokens. Direct URL access is blocked.
* **Dedicated reel pages** — Each reel gets its own `/reel/your-slug/` URL with a full-page branded player.
* **Waveform visualization** — Auto-generated waveform display generated from uploaded audio.
* **Access control** — Choose Public, Limited (personal links), or Disabled per reel.
* **Personal share links** — Send unique `?k=` links to specific recipients. Revoke access anytime.
* **Visit analytics** — Track total views and sessions per reel. Reset analytics per reel at any time.
* **Style presets** — Choose Dark (Cinematic) or Light (Clean) themes.
* **YouTube embeds** — Attach YouTube videos to your reel.
* **Rounded corner style** — Apply rounded corners to the player UI.
* **Contact section** — Add contact info, email reveal button, and CTA link.
* **Private audio storage** — Files stored outside the public web root with `.htaccess` protection.
* **SEO-safe** — Reel pages are set to noindex/nofollow. No Google indexing of private content.
* **Shortcode player** — Embed `[rc_audio_player]` in any post or page.

= Pro Features =

* **Up to 8 YouTube videos per reel**
* **Advanced analytics** — Unique sessions, traffic sources, UTM parameters, device/browser/OS breakdown, geographic data, per-person listening stats
* **Track-level analytics** — Play counts and listen time per track with completion percentage
* **CSV export** — Export full analytics data as CSV (visits, sources, per-person breakdown)
* **All 6 style presets** — Ocean Blue, Bold Accent, Rainbow Burst, Metallic Disc (Free includes Dark + Light)
* **Custom eyebrow title** — Replace "MEYDY REEL STUDIO" with your own studio name
* **Per-reel contact email mapping** — Private email reveal without exposing addresses in HTML

= Privacy & Security =

* Audio URLs expire after 20 minutes and require a valid HMAC signature.
* IP addresses are anonymized before storage (hashed, not raw).
* Geolocation is resolved from trusted proxy headers by default (no third-party API calls).
* External geo API (ipwho.is) is opt-in and displays a legal warning when enabled.
* Reel pages send `noindex, nofollow, noarchive` headers and a strict Content Security Policy.
* A plugin-dedicated signing key is generated on activation and stored separately from WordPress AUTH_SALT.
* **Visitor analytics** — Reel page visits are logged server-side (session hash, referrer, device/browser type, country). No data is shared with third parties. Data is stored only in your own database and can be reset or deleted at any time from the plugin admin.

= Third-Party Services =

This plugin integrates with **Freemius** for Pro license management. When a Pro license is purchased or a free trial is initiated, your email address, site URL, and basic WordPress environment data are transmitted to Freemius servers.

* [Freemius Privacy Policy](https://freemius.com/privacy/)
* [Freemius Terms of Service](https://freemius.com/terms/)

Freemius is not active for free users who have not initiated a trial or purchased a license. No data is sent to Freemius on free installs without a license.

= Requirements =

* PHP 8.1 or higher
* WordPress 6.2 or higher
* Audio files: MP3, WAV, M4A, AAC, OGG, FLAC

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/meydy-reel-studio/`, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Settings → MEYDY Reel Studio** to configure the private audio directory and access defaults.
4. Go to **Tools → MEYDY Reels Manager** to create your first reel.
5. Upload audio files, fill in reel details, and save.
6. Optionally, create personal share links for specific recipients from the reel's edit screen.
7. Share your reel URL (or personal link) with clients.

= Optional: Private Audio Directory =

By default, private audio files are stored in `wp-content/private-audio/`. You can override this in **Settings → MEYDY Reel Studio** or by defining `RC_AUDIO_PRIVATE_DIR` in `wp-config.php`.

== Frequently Asked Questions ==

= Can visitors download my audio files? =

No. Audio is streamed through signed, short-lived URLs (20-minute expiry). Right-click saving gives an expired URL. Files are stored outside the public web root and protected by `.htaccess`.

= Does the plugin work without Cloudflare? =

Yes. Cloudflare (or another reverse proxy) is optional. It improves geographic analytics if you use the Pro geo features with trusted proxy headers enabled.

= What file formats are supported? =

MP3, WAV, M4A, AAC, OGG, and FLAC.

= Can I use this plugin on multiple sites? =

Free plan: 1 site. Pro plans support multiple sites depending on your license tier. See the pricing page for details.

= Does the plugin support multisite networks? =

Not officially. The plugin works on individual sites within a network but is not tested for network-wide activation.

= Will reel pages appear in Google Search? =

No. The plugin sets `noindex, nofollow, noarchive` headers and meta tags on all reel pages. Search engines are also blocked via `robots.txt`.

= Can I customize the look of reel pages? =

Free plan includes Dark and Light style presets, plus rounded corner style. Pro plan adds 4 more themes: Ocean Blue, Bold Accent, Rainbow Burst, and Metallic Disc.

= What happens to my data if I uninstall the plugin? =

Uninstalling the plugin removes all plugin options from the database (settings, analytics). Audio files stored in `private-audio/` are **not** deleted automatically — you should remove them manually if needed.

= Is there a free trial of Pro? =

Yes, a 14-day free trial is available. No payment method required.

== Screenshots ==

1. Reel page in Dark (Cinematic) style — full-width banner, waveform player, track list
2. Reel page in Light (Clean) style
3. Reels Manager — create and manage all reels from one screen
4. Track analytics with play counts and listen-time completion bars
5. Personal share links — unique per-recipient URLs with access revocation

== Changelog ==

= 1.8.12 =
* Fixed: corrected readme.txt feature descriptions to accurately reflect Free vs Pro capabilities (rounded corners now listed as Free, removed incorrect per-reel limits that no longer exist in code)

= 1.8.11 =
* Fixed: Media URL to file path resolution now uses wp_upload_dir() instead of ABSPATH, fixing subdirectory install support (WP.org review fix P0TDX308576HGN)

= 1.7.7 =
* Fixed: Footer now shows "Powered by MEYDY Reel Studio" by default instead of claiming copyright over content owner's work
* Improved: Footer main line is fully user-controlled — include or omit "All rights reserved." as desired

= 1.7.6 =
* Fixed: Removed .htaccess files from plugin package (flagged by WP.org Plugin Check as hidden_files)

= 1.7.5 =
* Fixed: WP.org Plugin Check blockers — ABSPATH guards, languages directory, multiple phpcs:ignore comments, and EscapeOutput fixes
* Fixed: `.htaccess` files removed from plugin package
* Fixed: `Tested up to` updated to 6.9
* Improved: All 343 PHPUnit tests pass

= 1.7.4 =
* Fixed: FREE tier style preset now shows a selector (Dark + Light) instead of being locked to Dark only
* Security: Removed owner-domain bypass that granted automatic Pro access on localhost and plugin author's domain
* Improved: i18n — all `wp_die()` messages are now wrapped with `esc_html__()`
* Improved: Plugin header now includes all required WordPress.org fields (Text Domain, License, Requires PHP, Author URI)
* Added: `readme.txt` for WordPress.org submission

= 1.7.3 =
* Added: Track-level play analytics with per-person breakdown (Pro)
* Added: CSV export for analytics data (Pro)
* Added: Personal share links (`?k=`) with revocation support
* Added: YouTube video embeds per reel (up to 2 Free / 8 Pro)
* Added: Waveform visualization with canvas rendering
* Added: Geo privacy mode — strict header-only by default, external API opt-in
* Added: Device, browser, OS, and language analytics breakdown (Pro)
* Improved: Rate limiting on analytics endpoints
* Improved: Atomic JSON writes for reels.json
* Security: Plugin-dedicated HMAC signing key (isolated from AUTH_SALT)

= 1.7.2 =
* Added: Reel duplication in Reels Manager
* Added: Banner image support (separate from cover art)
* Added: About / Biography and Credits sections per reel
* Added: Footer owner line and subtext settings
* Improved: Admin UI — WP media picker for images

= 1.7.1 =
* Added: Access mode per reel (Public / Limited / Disabled)
* Added: Freemius integration for license management
* Added: Free vs Pro feature gating via RC_License_Policy
* Improved: Redirect handling with `wp_safe_redirect` fallback

= 1.7.0 =
* Initial public release
* Secure audio streaming with signed URLs
* Dedicated reel pages with noindex headers
* Visit analytics (views, sessions, sources)
* Shortcode player `[rc_audio_player]`

== External Services ==

This plugin may connect to the following external services under specific conditions:

= ipwho.is (Geolocation API) =

* **Used for:** Optional visitor geolocation in analytics (city, country, region).
* **Data sent:** Visitor IP address.
* **When:** Only when an admin explicitly enables "External Geo Lookup" in the plugin settings (Pro). This setting is **disabled by default** (Privacy by Default).
* **Default:** Disabled. Geolocation is derived from proxy headers only (e.g., Cloudflare) when the setting is off — no IP is sent to any third party.
* **Service URL:** https://ipwho.is
* **Privacy:** https://ipwho.is — No formal Terms of Service page is available for this service.

**Legal notice:** Before enabling this option, you must update your Privacy Policy to disclose that visitor IPs are transmitted to ipwho.is for geolocation. If you operate under GDPR, UK GDPR, or CCPA, you may need to obtain explicit visitor consent. Consult legal counsel if you are unsure of your obligations.

= Freemius =

* **Used for:** License management and plugin updates (Pro plan).
* **Data sent:** Email address, site URL, WordPress environment data — only when a Pro license is purchased or a free trial is initiated.
* **When:** Not active for free users who have not initiated a trial or purchased a license. No data is sent on free installs without a license.
* **Service URL:** https://freemius.com
* **Terms of Service:** https://freemius.com/terms/
* **Privacy Policy:** https://freemius.com/privacy/

== Upgrade Notice ==

= 1.7.4 =
Security fix: removes an internal bypass that granted automatic Pro access on certain domains. Free users now have style preset choice (Dark + Light). Recommended update for all users.
