=== Castio.live – Stream Live (HLS + Chat) ===
Contributors: proxymis
Donate link: https://proxymis.com/
Tags: live streaming, hls, video, chat, livestream, webrtc
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Live stream video directly from WordPress Admin using browser-based HLS. No OBS, no RTMP, no external streaming platform. Includes auto-generated viewer page and built-in live chat.

== Description ==

Castio.live is a WordPress plugin that lets you **stream live video directly from your WordPress Admin dashboard**, using modern browser technologies to generate HLS streams in real time.

Unlike traditional live streaming solutions, Castio.live does **not require OBS, FFmpeg, RTMP servers, or third-party streaming platforms**. Everything runs entirely inside WordPress, using your own server and infrastructure.

[youtube https://www.youtube.com/watch?v=fgw2u0fmAME]

👉 **Start streaming in minutes**
Install the plugin, click “Start Streaming” in WordPress Admin, and instantly share your live viewer page with your audience.

No external services. No vendor lock-in. Full control over your content.

=== Live Streaming from WordPress Admin ===

Castio.live adds a dedicated streaming interface directly inside the WordPress Admin area.

You can:
- Select your camera and microphone
- Preview your stream before going live
- Start and stop streaming with a single click

Supported capture technologies:
- MediaDevices API
- MediaRecorder
- WebCodecs (when available, for lower latency)

Supported streaming browsers:
- Chrome or Edge (desktop)
- Chrome (Android)

Viewer playback works on all modern browsers, including mobile devices.

=== Viewer Page (Auto-Generated) ===

For each live stream, Castio.live can automatically generate a viewer page.

Viewer page features:
- HLS video playback (native HLS on Safari, hls.js on other browsers)
- Clean and lightweight interface
- Mobile-friendly layout
- Optional live chat panel

The viewer page URL can be:
- Public
- Shared privately
- Embedded into other pages
- Protected via access control options

=== Built-in Live Chat ===

Each live stream can include a built-in real-time chat system.

Chat features:
- AJAX-based live message polling
- Username display
- Automatic refresh
- Message history stored in the WordPress database

Moderation tools:
- View all messages
- Delete individual messages
- Ban users by username
- Ban users by IP address

No external chat service or API is required.

=== Privacy, Ownership, and Compliance ===

Castio.live is designed with privacy and data ownership as a core principle.

- No third-party streaming services
- No external chat providers
- No analytics or tracking scripts
- No cloud processing of video or messages

All data remains on your own server:
- HLS video segments
- Chat messages
- Stream metadata
- Viewer page configuration

This makes Castio.live suitable for privacy-conscious websites and helps simplify compliance with GDPR and similar data protection regulations.

=== Technical Architecture ===

Castio.live is a fully WordPress-native plugin.

No dependencies on:
- FFmpeg
- Node.js
- RTMP servers
- External APIs

Core components:
- Browser-based HLS generation
- PHP for stream lifecycle and data storage
- JavaScript for capture, playback, and chat
- WordPress custom post types and options

The plugin works on shared hosting, VPS, and dedicated servers.

=== Key Features Summary ===

- Live stream directly from WordPress Admin
- No OBS, no RTMP, no external streaming service
- Browser-generated HLS (.m3u8 + .ts)
- Automatic viewer page creation
- Built-in live chat
- Chat moderation tools
- Mobile-friendly viewer experience
- All data stored locally in WordPress
- Lightweight and efficient
- Compatible with most CDNs, including Cloudflare

=== Who Is This Plugin For? ===

Castio.live is ideal for:
- Educators and online trainers
- Content creators
- Community websites
- Event organizers
- Developers and agencies
- Anyone who wants full control over live streaming without SaaS platforms

=== Demo and Additional Features ===

A public demo, documentation, and optional commercial features are available at:
https://castio.live

Commercial offerings may include:
- Advanced access control
- Enhanced chat moderation
- Extended streaming options
- Priority support

The core plugin remains fully functional without any external service.

=== Author and Support ===

Developed by proxymis
Website: https://proxymis.com
Contact: contact@proxymis.com

== Installation ==

1. Upload the `castio-live` folder to `/wp-content/plugins/`, or search for “Castio.live” in the WordPress Plugin Directory.
2. Activate the plugin from the Plugins menu.
3. In WordPress Admin, go to Stream Live and create a new stream.
4. Click “Start Streaming” and share the viewer page URL.

Notes:
- Streaming requires Chrome or Edge on desktop, or Chrome on Android.
- iOS Safari and Firefox do not currently support the required streaming APIs.
- Viewing streams works on all modern browsers.
- HLS files are written to `wp-content/uploads/wpsl/{stream_id}`.

== Frequently Asked Questions ==

= Does this plugin use external streaming servers? =
No. All video segments are generated in the browser and stored locally on your WordPress server.

= Can viewers watch streams on iOS Safari? =
Yes. Viewer playback works on iOS Safari using native HLS support.

= Why can’t I stream from iOS Safari or Firefox? =
Those browsers do not currently expose the APIs required to generate HLS streams in the browser.

= Is this plugin compatible with CDNs? =
Yes. Castio.live works with most CDNs, including Cloudflare.

== Screenshots ==
1. Admin streaming interface with camera preview
2. Viewer page with HLS player and live chat
3. Chat moderation interface

== Changelog ==

= 1.0.0 =
Initial public release.

== Upgrade Notice ==

= 1.0.0 =
First public release on WordPress.org.
