RemoteVideoRenderCallback.cs 808 B

1234567891011121314151617181920212223242526
  1. using ManageLiteAV;
  2. using System;
  3. namespace Vinno.FIS.TRTCClient
  4. {
  5. public class RemoteVideoRenderCallback : ITRTCVideoRenderCallback
  6. {
  7. private readonly Action<TRTCVideoFrame, string> _frameArrivedCallback;
  8. public RemoteVideoRenderCallback(Action<TRTCVideoFrame, string> frameArrivedCallback)
  9. {
  10. _frameArrivedCallback = frameArrivedCallback;
  11. }
  12. /// <summary>
  13. /// Received remote video frame
  14. /// </summary>
  15. /// <param name="userId"></param>
  16. /// <param name="streamType"></param>
  17. /// <param name="frame"></param>
  18. public void onRenderVideoFrame(string userId, TRTCVideoStreamType streamType, TRTCVideoFrame frame)
  19. {
  20. _frameArrivedCallback?.Invoke(frame, userId);
  21. }
  22. }
  23. }