Download the PHP package vizor-vr/laravel-vizor without Composer
On this page you can find all versions of the php package vizor-vr/laravel-vizor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-vizor
Vizor for Laravel
Laravel package for the Vizor VR video player. Provides 7 Blade components, 6 Livewire components with reactive state, an Alpine.js plugin, a full API facade, Filament admin integration, license validation middleware, and a Tailwind CSS preset -- everything you need to embed 360/VR/WebXR video in a Laravel application.
Requirements
- PHP 8.2+
- Laravel 11 or 12
- Livewire 3+
Installation
The install command publishes the config file, the Alpine.js plugin, and generates a test page at /vizor-test.
Quick Start
1. Install the package
2. Add environment variables
3. Use a Blade component
Visit /vizor-test to verify the player renders correctly.
Blade Components
All 7 components auto-include the player script via @vizorScripts and accept an optional {{ $slot }} for child elements.
| Component | Element | Use case |
|---|---|---|
<x-vizor-video> |
<vz-video> |
360/VR/flat video |
<x-vizor-img> |
<vz-img> |
360/VR images |
<x-vizor-tour> |
<vz-tour> |
Multi-scene virtual tours |
<x-vizor-cinema> |
<vz-cinema> |
Virtual cinema environment |
<x-vizor-live> |
<vz-live> |
Live HLS/DASH streams |
<x-vizor-playlist> |
<vz-playlist> |
Multi-video playlist |
<x-vizor-annotation> |
<vz-annotation> |
Spatial annotations (nested inside video) |
Video
Image
Tour
Cinema
Live Stream
Playlist
Annotations
Nest <x-vizor-annotation> inside a video component to place 3D hotspots:
Livewire Components
Full server-side reactive state with two-way binding. All components use the HasVizorEvents and HasVizorProps traits.
| Livewire Tag | Reactive State |
|---|---|
<livewire:vizor-video-player> |
currentTime, duration, volume, playing, isMuted, fullscreen, ready |
<livewire:vizor-img-viewer> |
ready |
<livewire:vizor-tour-viewer> |
ready, currentProbeId |
<livewire:vizor-cinema-player> |
currentTime, duration, volume, playing, isMuted, ready |
<livewire:vizor-live-player> |
playing, ready, volume, isMuted |
<livewire:vizor-playlist-player> |
currentIndex, currentTitle, totalItems, playing, ready |
Usage
Server-Side Control
All video-based Livewire components expose play(), pause(), and seek() methods you can call from other Livewire components or from Blade:
Generating Custom Components
Scaffold a new Livewire component with Vizor boilerplate:
This creates app/Livewire/MyCustomPlayer.php and resources/views/livewire/my-custom-player.blade.php with the full event handler scaffold.
Alpine.js Plugin
For projects that don't use Livewire, the Alpine.js plugin provides client-side reactive bindings with no server round-trips.
Setup
Register the plugin in your resources/js/app.js:
Usage
The vizorPlayer data component exposes: ready, playing, currentTime, duration, volume, muted, fullscreen, loading, error -- plus methods play(), pause(), togglePlay(), seek(t), toggleMute(), setVolume(v), enterFullscreen(), exitFullscreen().
Vizor Facade
The Vizor facade provides typed access to the Vizor REST API. It is backed by the VizorManager class and configured via VIZOR_API_KEY and VIZOR_API_URL.
Content
Analytics
API Keys
License Keys
Billing
Artisan Commands
| Command | Description |
|---|---|
vizor:install |
Publish config, Alpine plugin, prompt for API key, generate test page |
vizor:component {name} |
Scaffold a Livewire component with Vizor boilerplate |
vizor:test-page |
Create a test page with all player types at /vizor-test |
vizor:examples |
Publish 3 example components (VideoPlayer, VideoGallery, AnalyticsDashboard) |
All commands accept --force to overwrite existing files.
Middleware
The vizor.license middleware validates your license key against the Vizor API (with cache). On failure it degrades the tier to free (watermark, mono only) rather than blocking the request.
Route Group
Configuration
Filament Integration
The package includes a Filament v3 plugin with a content resource and an embeddable player widget.
Setup
Enable in your .env:
Register the plugin in your panel provider:
This adds:
- Content Resource -- full CRUD table for Vizor content
- Player Widget -- embeddable VR player widget for dashboards
Broadcasting
Optionally broadcast player events (play, pause, ended, ready, error, timeupdate) over Laravel Echo for real-time dashboards or collaborative features.
Enable
Listen
Events broadcast: PlayerReady, PlayerPlay, PlayerPause, PlayerEnded, PlayerError, PlayerTimeUpdate.
Tailwind CSS Preset
Import the preset in your tailwind.config.js for Vizor-specific utilities:
Included utilities
| Class | Description |
|---|---|
vizor-container |
16:9 aspect ratio, full width, relative positioned |
vizor-container-4k |
Same as above, max 3840px, centered |
vizor-rounded |
0.75rem border radius with overflow hidden |
vizor-shadow |
VR player drop shadow |
vizor-loading |
Dark pulsing loading placeholder |
text-vizor-primary |
Primary brand color (CSS variable --vizor-primary) |
aspect-vizor |
16:9 aspect ratio |
aspect-vizor-square |
1:1 aspect ratio |
max-w-vizor-1080 |
Max width 1920px |
Responsive: vizor-sm, vizor-md, vizor-lg, vizor-xl |
Breakpoints at 480/768/1024/1440px |
Configuration Reference
Publish the config file with php artisan vendor:publish --tag=vizor-config.
| Config Key | Env Variable | Default | Description |
|---|---|---|---|
api_url |
VIZOR_API_URL |
https://api.vizor-vr.com |
Vizor API base URL |
api_key |
VIZOR_API_KEY |
null |
Your Vizor API key |
license_key |
VIZOR_LICENSE_KEY |
null |
Standalone license key |
license_mode |
VIZOR_LICENSE_MODE |
saas |
saas or standalone |
cdn_url |
VIZOR_CDN_URL |
https://cdn.jsdelivr.net/npm/@vizor-vr/player@latest/dist |
Player script CDN URL |
player_version |
VIZOR_PLAYER_VERSION |
0.1.0 |
Player version |
use_local_assets |
VIZOR_USE_LOCAL_ASSETS |
false |
Serve player JS from local assets |
default_format |
-- | MONO_360 |
Default projection format |
default_controls |
-- | true |
Show controls by default |
default_muted |
-- | false |
Start muted by default |
primary_color |
VIZOR_PRIMARY_COLOR |
#f43f5e |
Brand primary color |
brand_name |
VIZOR_BRAND_NAME |
null |
Custom brand name |
brand_logo |
VIZOR_BRAND_LOGO |
null |
Custom brand logo URL |
validate_license |
VIZOR_VALIDATE_LICENSE |
true |
Enable license validation |
license_cache_ttl |
VIZOR_LICENSE_CACHE_TTL |
3600 |
License cache duration (seconds) |
broadcasting.enabled |
VIZOR_BROADCASTING |
false |
Enable event broadcasting |
broadcasting.channel_prefix |
-- | vizor |
Echo channel prefix |
filament.enabled |
VIZOR_FILAMENT |
false |
Enable Filament integration |
filament.navigation_group |
-- | Vizor |
Filament nav group label |
Publishable Assets
Supported Formats
The FormatEnum enum covers all 19 projection formats:
Full format list
| Enum Value | Label | |-----------|-------| | `MONO_360` | Mono 360 | | `MONO_FLAT` | Mono Flat | | `STEREO_180_LR` | Stereo 180 Side-by-Side | | `STEREO_180_TB` | Stereo 180 Top-Bottom | | `STEREO_180_LR_SPHERICAL` | VR180 Side-by-Side | | `STEREO_180_TB_SPHERICAL` | VR180 Top-Bottom | | `STEREO_360_LR` | Stereo 360 Side-by-Side | | `STEREO_360_TB` | Stereo 360 Top-Bottom | | `STEREO_FLAT_LR` | Stereo Flat Side-by-Side | | `STEREO_FLAT_LR_SQUARE` | Stereo Flat SBS Square | | `STEREO_FLAT_TB` | Stereo Flat Top-Bottom | | `STEREO_FLAT_TB_SQUARE` | Stereo Flat TB Square | | `MONO_CUBEMAP` | Mono Cubemap | | `STEREO_CUBEMAP` | Stereo Cubemap | | `MONO_EAC` | Mono EAC | | `STEREO_EAC_TB` | Stereo EAC Top-Bottom | | `MONO_FISHEYE` | Mono Fisheye | | `STEREO_FISHEYE_LR` | Stereo Fisheye Side-by-Side | | `CARDBOARD_PHOTO` | Cardboard Photo |Testing
The package uses Pest with both unit and feature tests.
Tests cover: service provider registration, Blade components, Livewire components, Facade API client, middleware, commands, broadcasting, Filament plugin, Tailwind preset, config, enums, and traits.
Changelog
See CHANGELOG.md for release history.
License
The MIT License (MIT). See LICENSE for details.
All versions of laravel-vizor with dependencies
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/view Version ^11.0|^12.0
livewire/livewire Version ^3.0