|
@@ -107,32 +107,48 @@ public class AgoraRTCManager : SingletonMono<AgoraRTCManager>
|
|
|
{
|
|
|
Debug.Log(" JoinChannel " + _channelName);
|
|
|
RtcEngine.EnableAudio();
|
|
|
-
|
|
|
+ if(DeviceType.type!="LeiNiao")
|
|
|
+ {
|
|
|
+
|
|
|
+ RtcEngine.EnableVideo();
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if (DeviceType.type != "LeiNiao")
|
|
|
+ {
|
|
|
+ VideoEncoderConfiguration config = new VideoEncoderConfiguration();
|
|
|
+ config.dimensions = new VideoDimensions(1280, 720);
|
|
|
+ config.frameRate = 15;
|
|
|
+ config.bitrate = 0;
|
|
|
+
|
|
|
+ RtcEngine.SetVideoEncoderConfiguration(config);
|
|
|
+ }
|
|
|
RtcEngine.SetChannelProfile(CHANNEL_PROFILE_TYPE.CHANNEL_PROFILE_COMMUNICATION);
|
|
|
RtcEngine.SetClientRole(CLIENT_ROLE_TYPE.CLIENT_ROLE_BROADCASTER);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ if (DeviceType.type != "LeiNiao")
|
|
|
+ {
|
|
|
+ RtcEngine.SetExternalVideoSource(true, true, EXTERNAL_VIDEO_SOURCE_TYPE.VIDEO_FRAME, new SenderOptions());
|
|
|
+ }
|
|
|
RtcEngine.JoinChannel(_token, _channelName, "", uid);
|
|
|
- if (!isSwitchCamera&&(DeviceType.type != "Rhinox"|| DeviceType.type!= "Phone"))
|
|
|
+ if (DeviceType.type != "LeiNiao")
|
|
|
{
|
|
|
-
|
|
|
- isSwitchCamera = !isSwitchCamera;
|
|
|
+ if (!isSwitchCamera && (DeviceType.type != "Rhinox" || DeviceType.type != "Phone"))
|
|
|
+ {
|
|
|
+ RtcEngine.SwitchCamera();
|
|
|
+ isSwitchCamera = !isSwitchCamera;
|
|
|
+ }
|
|
|
}
|
|
|
StartCoroutine(InitVideoAndAduio(1f));
|
|
|
- if(!RTCINIT)
|
|
|
+
|
|
|
+ if (!RTCINIT)
|
|
|
{
|
|
|
RTCINIT = true;
|
|
|
-
|
|
|
+ if (DeviceType.type != "LeiNiao")
|
|
|
+ {
|
|
|
+ StartCoroutine(RenderTexturesScreenCapture());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
static bool RTCINIT;
|