1. Introduction
Provide developers and support with the information needed to deploy, configure, and diagnose BlazorVideo and its attached media boxes.
Assumes .NET 8, Blazor Server; describes how InventoryOS’s DigitalSignage component on the kiosk instructs the “Media Boxes” to open the correct BlazorVideo URL for streaming.
Prerequisites:
- Host OS (BlazorVideo server): Windows Server or Windows 10/11
- .NET: .NET 8 Hosting Bundle
- 7-Zip CLI (server): 7z.exe installed at one of:
- C:\Program Files\7-Zip\7z.exe
- C:\Program Files (x86)\7-Zip\7z.exe
- Network Ports:
- TCP 7207 (BlazorVideo SignalR & page)
2. System Overview
BlazorVideo comprises:
- Blazor Server App
- Hosted as a Windows service named BlazorVideo on the central kiosk server
- Renders a <video> tag in client browsers
- Uses SignalR (PlaybackHub) for synchronized playback
- JavaScript Interop
- mediaPlayerInterop for video operations
- heartbeat for page-visibility heartbeats
- SignalR Hub
- PlaybackHub broadcasts state changes and coordinates multi-screen readiness
- Services
- PlaybackService (IPlaybackService): manages per-group playback state and leader election
- AdvertisementHandler: loads, caches, and validates AdvertisementsSchedule.json, watches for changes
- InventoryOS on the Kiosk
- At startup, its DigitalSignage component reads DigitalSignageConfig.json and issues commands to each Media box over SSH to open a browser pointed at the BlazorVideo URL for its assigned group and screen index
- ManageIqBoxDS
- GUI for merch mode to view and adjust group/index settings in DigitalSignageConfig.json on the kiosk
3. Installation & Configuration
3.1 BlazorVideo Server
- Deploy the service:
- Installs as a Windows service named BlazorVideo (e.g. sc create BlazorVideo binPath= "C:\InstantDVD\Advertisement\blazorvideoapp\BlazorVideo.exe").
- Install prerequisites:
- Ensure .NET 8 Hosting Bundle & 7-Zip CLI are installed on the server.
- Configure network:
- Open TCP 7207, UDP 4000, TCP 4001, and HTTPS 443.
3.2 Kiosk & IQ-Box Configuration
- DigitalSignageConfig.json (on the kiosk)
- Path: C:\InstantDVD\Misc\Storage\DigitalSignageConfig.json
- Defines the IPs of each IQ box and its assigned group/index. Example:
- Updated via the ManageIqBoxDS GUI; backed up as AdvertisementBackup\DigitalSignageConfig.backup.json.
- InventoryOS DigitalSignage Component
- On kiosk startup, reads the above JSON and for each entry:
- Opens a TCP/UDP connection to the IQ box at IpAddress.
- Sends a command (OpenUrl) that includes the BlazorVideo base URL, group ID, and screen index.
- The IQ box’s local startup script or service (outside of InventoryOS) then launches its browser to that URL.
- On kiosk startup, reads the above JSON and for each entry:
4. JavaScript Interop
- initialize (isProduction, dotNetRef)
Registers beforeunload and pagehide to call UnregisterMeAsync on disconnect. - log (level, message)
Prepends a timestamp; routes to console.info, console.warn, or console.error. - setSrc(videoElement, src, deviceId, groupId, force = false)
- Fade opacity
- Normalize URL; avoid redundant reloads
- Attach canplay and ended handlers
- Invoke ReportOnPlaying when ready
- play (videoElement, connectionId) & playWhenReady(videoElement, time)
Mute then play; wait for metadata if needed. - heartbeat.isPageVisible()
Returns document.visibilityState === 'visible'.
5. Blazor Components
MediaPlayerComponent
- Parameter: GroupAndScreen (group ID + optional screen index)
- OnAfterRenderAsync(firstRender):
- Sets up dotNetRef
- Initializes JS interop
- Opens SignalR connection
- Event Handling:
-
- PlaybackStateChanged
- AssignRole (leader election)
- Triggers PlayWhenReady
-
Multi-screen Coordination
- Leader Election: via AssignRole; only leader advances state
- Readiness Reporting: clients report via hub; when all ready, hub advances to next ad
6. Service Layer
- PlaybackService
- Holds in-memory PlaybackState per group (ads list, current index/time)
- Methods: StartPlayback, HandleMediaEnded, GetCurrentStateAsync
- Manages leader/client state with concurrent collections and semaphores
- AdvertisementHandler
- Loads & validates AdvertisementsSchedule.json
- Caches results; watches for file or directory changes
- Triggers ScheduleChanged; maintains a backup JSON for restoration if needed
7. Service Lifecycle & Update Mechanism
- InventoryOS finds Media boxes reportin and starts its lifecycle.
- Service is automatically reinstalled if new tar.gz exists.
- Media Box Browser Launch:
- InventoryOS on the kiosk checks DigitalSignageConfig.json on startup and issues OpenUrl commands so each Media Box browser navigates to the correct BlazorVideo URL.
8. Operation & Maintenance
- Logging:
- Server: InstantDVD.QuickLog("BlazorVideo")
- InventoryOS: InstantDVD.QuickLog("DigitalSignageManager")
- Health Monitoring:
- Configure Windows service recovery for BlazorVideo to auto-restart on failure
- JS heartbeat pauses playback when page hidden and drops client
- Cache & Cleanup:
- AdvertisementHandler clears expired ads based on the defined schedule
9. Support & Troubleshooting Guide
Issue 1: Service Fails to Start
Symptom: The BlazorVideo Windows service is not running or won’t start.
Resolution:
- Verify that C:\InstantDVD\Advertisement\blazorvideoapp\BlazorVideo.exe exists.
- Confirm that the .NET 8 Hosting Bundle is installed on the server.
- Ensure 7-Zip CLI (7z.exe) is installed in one of the expected locations or on the system PATH.
- Inspect the Windows Event Viewer on the kiosk for any service-startup errors.
Issue 2: Media Boxes Don’t Show Video
Symptom: Client browsers launch but display blank screens or errors instead of video.
Resolution:
- Validate that DigitalSignageConfig.json on the kiosk lists each Media-Box’s correct IP address, Pi ID (Piid), group ID, and screen index.
- Confirm the InventoryOS DigitalSignage component is running on the kiosk and issuing OpenUrl commands to each IQ-Box.
- Check that TCP 7207 (SignalR) are open in firewall.
Issue 3: Advertisements Don’t Update
Symptom: Old ads continue playing; new content never downloads.
Resolution:
- Verify that Advertisement.tar.gz has been uploaded to the server’s ROOT\Advertisement folder.
- Inspect AdvertisementsSchedule.json for valid JSON syntax and correct timestamps.
- Reset the AdvertisementTS value to 0 in the client configuration to force a full resynchronization.
- Make sure that the advertisement is created for the correct endpoint and operator. Check the web2 server.
Issue 4: Playback Out of Sync
Symptom: Multiple screens are not synchronized in playback.
Resolution:
- Ensure all Media Boxes intended to play the same content share the identical group ID in DigitalSignageConfig.json.
- Confirm that each client browser has reported readiness via the SignalR hub before advancing playback.Top of Form