HISPlayer / Unity_Video_Player

Include HLS and DASH video streaming with Widevine Level 1 DRM content protection inside your real-time Unity Games, Metaverses, and VR/AR apps.
https://hisplayer.com/unity-player-sdk/
8 stars 1 forks source link

Reconnect to HLS Stream #7

Closed lukf12 closed 1 month ago

lukf12 commented 1 month ago

Hello, thanks for your amazing Player, I use it to live stream a camera with h265 8k into a VR headset via HLS. It works fine but when I stop the stream on the camera and restart it, the Player does not open the stream any more until i completely stop the application and restart it. I use the Unity Android_360Template on a PICO 4 with the SDK v3.4.1. Is there any option to automatically restart the stream when it comes back online? I thought the ErrorNetworkFailed and EventNetworkConnected should do the work but unfortunately they do not trigger. Thanks in advance

Nusi-22 commented 1 month ago

Hello @lukf12 ,

Could you try to use https://hisplayer.github.io/UnityAndroid-SDK/#/hisplayer-api?id=protected-virtual-void-eventplaybackreadyhisplayereventinfo-eventinfo to detect when the stream is available and ready to be used again? Then call https://hisplayer.github.io/UnityAndroid-SDK/#/hisplayer-api?id=protected-void-playint-playerindex to play the stream after the event has been triggered.

lukf12 commented 1 month ago

Thank you it works now, but another question regarding RealTimeLiveStreaming, is there a way to see what is inside the Video Buffer, because when I Seek forward to the most recent frame, the video stucks for a few seconds until the "Buffering Ended Callback" appears and continous from there. Is there a possibility to modify this buffer for getting lower latency ? Thanks in advance

Nusi-22 commented 1 month ago

This feature is not supported in the current version, we will add it to our roadmap.