SCRtcAndroidEngine.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. using LitJson;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SCRtcAndroidEngine : SCRtcEngine
  5. {
  6. public void setProduce(string msg)
  7. {
  8. return;
  9. }
  10. public string getwifi()
  11. {
  12. return "";
  13. }
  14. //调节他人音量
  15. public double GetaudioMe()
  16. {
  17. double d = 0.0f;
  18. return d;
  19. }
  20. //调节他人音量
  21. public double GetaudioPeer(string consumerId)
  22. {
  23. double d = 0.0f;
  24. return d;
  25. }
  26. SDKCallbackListener sdk;
  27. //增加监听
  28. public void addListener()
  29. {
  30. if (sdk == null)
  31. {
  32. sdk = new SDKCallbackListener();
  33. }
  34. }
  35. override public void send(Queue<JsonData> jsondata)
  36. {
  37. JsonData data;
  38. if (jsondata.Count > 0)
  39. {
  40. data = jsondata.Dequeue();
  41. switch (data["action"].ToString())
  42. {
  43. case "InitRTC":
  44. break;
  45. case "changeVideo":
  46. break;
  47. case "setMute":
  48. break;
  49. case "sendVideo":
  50. break;
  51. case "enableVideoOnly":
  52. break;
  53. case "enableAudioOnly":
  54. break;
  55. case "openSpeaker":
  56. break;
  57. case "closeSpeaker":
  58. break;
  59. case "setVolume":
  60. break;
  61. case "sendMic":
  62. break;
  63. case "openRev":
  64. break;
  65. case "closeRev":
  66. break;
  67. case "Close":
  68. SCRtcFactory.Instance.isClose = true;
  69. break;
  70. case "addTextureID":
  71. break;
  72. case "audioPeerChange":
  73. break;
  74. case "audioMeChange":
  75. break;
  76. case "changePeerVideo":
  77. break;
  78. case "changeName":
  79. break;
  80. case "joinRoom":
  81. break;
  82. case "GetaudioMe":
  83. break;
  84. case "GetaudioPeer":
  85. break;
  86. case "onSocketMesseage":
  87. break;
  88. case "initRtpCapabilities":
  89. break;
  90. case "createRecvTransport":
  91. break;
  92. case "createSendTransport":
  93. break;
  94. case "onNewConsumer":
  95. break;
  96. case "getDevice":
  97. break;
  98. case "setProduce":
  99. break;
  100. case "startCamera":
  101. break;
  102. case "stopCamera":
  103. break;
  104. case "addCameraLocal":
  105. break;
  106. }
  107. }
  108. }
  109. }