LivePusherCreator.cs 1.1 KB

123456789101112131415161718192021222324252627
  1. using Vinno.vCloud.Common.FIS.Consultation;
  2. using Vinno.vCloud.FIS.Windows.RTMP;
  3. using Vinno.vCloud.Protocol.Messages.Client.LiveTalking;
  4. using Vinno.vCloud.Push.Configuration;
  5. namespace Vinno.vCloud.FIS.Windows
  6. {
  7. class LivePusherCreator : ILivePusherCreator
  8. {
  9. /// <summary>
  10. /// Apply a pusher
  11. /// </summary>
  12. /// <param name="url">push url</param>
  13. /// <param name="videoDeviceId"></param>
  14. /// <param name="audioDeviceId"></param>
  15. /// <param name="audioMode"></param>
  16. /// <returns></returns>
  17. public ILivePusher CreateLivePusher(string url, string videoDeviceId, int audioDeviceId, AudioMode audioMode, LiveTalkingMode liveTalkingMode = LiveTalkingMode.Video)
  18. {
  19. if (liveTalkingMode == LiveTalkingMode.Video)
  20. {
  21. return new SuperDevicePusher(url, videoDeviceId, audioDeviceId, audioMode, ResolutionMode.Medium) { EnablePreview = true };
  22. }
  23. return new SuperDevicePusher(url, string.Empty, audioDeviceId, audioMode, ResolutionMode.Medium) { EnablePreview = false };
  24. }
  25. }
  26. }