The Spaces SDK includes robust support for HLS streaming from React to Unity using the HISPlayer video player. The implementation includes multiple fallback mechanisms to ensure compatibility with different versions of the HISPlayer SDK.
- HLSStreamReceiver: Handles incoming HLS stream URLs from React and updates the video player
- VideoSamplesUpdater: Directly updates the MultiStreamProperties collection in HISPlayerController
- HISPlayerAdapter: Implements the IVideoStreamController interface for HISPlayerController
To integrate HLS streaming in your project:
- Attach the
HLSStreamReceivercomponent to the GameObject that has your HISPlayerController - Assign the HISPlayerController to the
playerControllerComponentfield - From React, send HLS stream URLs using the JSON format described in the integration guide
See HLS_Streaming_Integration_Guide.txt for detailed integration instructions.
- Fixed identifier "LiveProjector" for easy targeting from React
- Direct targeting of Element 0 in MultiStreamProperties to update stream URLs
- Multiple fallback mechanisms for different HISPlayer SDK versions
- Regular status updates sent back to React
- Automatic component discovery and setup