# Strimly Video Embedder WordPress Plugin

A powerful WordPress plugin that allows you to easily embed Strimly.io videos in your WordPress site with shortcodes, blocks, and automatic embedding.

## Features

- ✅ **Video Library** - View and manage all your Strimly videos
- ✅ **Shortcode Support** - Easy video embedding with `[strimly_video]`
- ✅ **Quality Selector** - Manual quality control for videos
- ✅ **Auto-embedding** - Automatically convert Strimly URLs to embeds
- ✅ **Responsive Design** - Works on all devices
- ✅ **HLS Support** - Advanced video streaming
- ✅ **Admin Interface** - Easy configuration and management

## Installation

1. **Upload Plugin**
   - Go to WordPress Admin → Plugins → Add New
   - Click "Upload Plugin"
   - Choose the plugin zip file
   - Click "Install Now"

2. **Activate Plugin**
   - Click "Activate Plugin"

3. **Configure Settings**
   - Go to **Strimly Videos** → **Settings**
   - Enter your Strimly.io email address
   - Test the connection
   - Save settings

## Usage

### Shortcode Method

Use the shortcode `[strimly_video]` in your posts and pages:

```
[strimly_video id="your-video-id"]
```

#### Shortcode Parameters

- `id` (required) - Your Strimly video ID
- `width` (optional) - Video width (default: 100%)
- `height` (optional) - Video height (default: 400)
- `autoplay` (optional) - Enable autoplay (true/false)
- `controls` (optional) - Show controls (true/false)
- `preload` (optional) - Preload setting (metadata/auto/none)

#### Examples

```
[strimly_video id="abc123"]
[strimly_video id="abc123" width="800" height="450"]
[strimly_video id="abc123" autoplay="true"]
```

### Auto-embedding

Paste any Strimly.io video URL in your content and it will automatically be converted to an embed:

```
https://strimly.io/player?playlist=https://strimly.io/f/abc123/playlist.m3u8
```

### Video Library

1. Go to **Strimly Videos** → **All Videos**
2. View all your videos in a beautiful grid
3. Click **View Details** for more information
4. Click **Copy Shortcode** to get embed code

## Configuration

### Settings

- **Strimly Email** - Your Strimly.io account email
- **API Key** - Optional API key for advanced features
- **Auto-embed** - Automatically convert URLs to embeds

### Test Connection

Use the "Test Connection" button to verify your setup is working correctly.

## Video Quality

The plugin includes a quality selector that allows users to manually change video quality:

- Multiple quality levels available
- Automatic quality switching
- Manual quality selection
- Responsive design

## Technical Details

### Requirements

- WordPress 5.0 or higher
- PHP 7.4 or higher
- Modern web browser with HLS support

### Dependencies

- Video.js 8.6.1
- Video.js HLS Plugin
- Video.js Quality Levels Plugin
- Video.js Quality Selector Plugin

### Browser Support

- Chrome 30+
- Firefox 23+
- Safari 6+
- Edge 12+
- Internet Explorer 11+

## Troubleshooting

### Common Issues

1. **Videos not loading**
   - Check your email configuration
   - Test the connection
   - Verify video ID is correct

2. **Quality selector not showing**
   - Ensure all Video.js plugins are loaded
   - Check browser console for errors
   - Verify HLS support

3. **Plugin installation failed**
   - Check WordPress version compatibility
   - Verify PHP version
   - Check file permissions

### Debug Mode

Enable WordPress debug mode to see detailed error messages:

```php
// In wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
```

## Support

For support and documentation, visit:
- **Website**: https://strimly.io
- **Documentation**: https://strimly.io/docs
- **Support**: https://strimly.io/support

## Changelog

### Version 1.0.6
- **SECURITY**: Removed email-only authentication fallback - API key is now mandatory
- Enhancement: Strengthened WordPress API security by requiring API key authentication
- Important: Users must generate API key at https://strimly.io/account/settings

### Version 1.0.5
- Fix: WordPress Plugin Directory compliance - reduced tags to 5 maximum
- Fix: Shortened description to meet 150 character limit for plugin directory
- Update: Optimized plugin metadata for better WordPress.org compatibility

### Version 1.0.4
- Fix: Improved subscription status display and plan information
- Enhancement: Better error handling for API key authentication
- Update: Enhanced Settings page with proper Free plan display
- Improvement: More robust authentication flow for WordPress integration

### Version 1.0.3
- Security: API key authentication is now required for enhanced security
- Update: API key field changed from optional to required
- Improvement: Enhanced connection with Strimly.io API for better reliability
- Security: Deprecated email-only authentication for better data protection

### Version 1.0.2
- Update: Author information and contributors updated
- Update: Author URI now points to Claritee LinkedIn profile
- Maintenance: Version bump for new release

### Version 1.0.1
- Fix: Auto-embed no longer rewrites Strimly links inside iframe attributes
- Improvement: Robust URL decoding before ID extraction

### Version 1.0.0
- Initial release
- Video library functionality
- Shortcode support
- Quality selector
- Auto-embedding
- Admin interface
- Responsive design

## License

This plugin is licensed under the GPL v2 or later.

## Credits

- **Video.js** - Video player library
- **Strimly.io** - Video hosting platform
- **WordPress** - Content management system 