public void EnterHall()
 {
     if (this.isConfigOpen)
     {
         Debug.Log("Hall");
         QGameKit.EnterLiveHall();
     }
 }
 public void StopBroadcast()
 {
     if (this.isConfigOpen)
     {
         Debug.Log("stop live broadcast!");
         QGameKit.StopLiveBroadcast();
     }
 }
 public void TearDown()
 {
     if (this.isConfigOpen && !string.IsNullOrEmpty(BroadcastManager.m_openId))
     {
         Debug.Log("tear down!");
         QGameKit.TearDown();
     }
 }
 public int GetState()
 {
     if (this.isConfigOpen)
     {
         QGameKit.LiveStatus errorCode = (QGameKit.LiveStatus)QGameKit.GetErrorCode();
         Debug.Log("GetState " + errorCode);
         return((int)errorCode);
     }
     return(0);
 }
Exemple #5
0
 public static bool Setup(string gameId, string wnsAppId, QGameKit.CaptureType captureType, QGameKit.UserAccountDelegate accountDelegate, QGameKit.Environment env)
 {
     QGameKit.QGameKitObj = QGameKitAndroidBridge.Setup(gameId, wnsAppId, captureType, accountDelegate, env);
     if (null == QGameKit.QGameKitObj)
     {
         Debug.LogError("QGameKitObj init failed!");
         return(false);
     }
     QGameKit.UserAccount account = accountDelegate();
     QGameKit.UpdateUserAccount(account);
     QGameKit.liveStatus = QGameKit.LiveStatus.Prepared;
     return(true);
 }
 public void StartLiveBroadcast(string title, string desc)
 {
     if (this.isConfigOpen)
     {
         Debug.Log("Start live broadcast");
         QGameKit.LiveStatus errorCode = (QGameKit.LiveStatus)QGameKit.GetErrorCode();
         if (errorCode == QGameKit.LiveStatus.Error)
         {
             QGameKit.Reset();
         }
         QGameKit.StartLiveBroadcast(title, desc);
     }
 }
 public bool ShowCamera(bool show)
 {
     Debug.Log("showcamera:" + show);
     if (!QGameKit.IsSupportCamera() || !this.isConfigOpen)
     {
         Hotfix.LuaShowSystemTip("系统版本太低,不支持开启摄像头");
         return(false);
     }
     if (show)
     {
         return(QGameKit.ShowCamera());
     }
     QGameKit.HideCamera();
     return(true);
 }
 public void ToStart()
 {
     QGameKit.CaptureType captureType = (QGameKit.CaptureType) 10;
     QGameKit.Setup("1105309683", "203090", captureType, new QGameKit.UserAccountDelegate(BroadcastManager.UserAccountDelegate), QGameKit.Environment.Release);
     if (!BroadcastManager.enableDanku)
     {
         QGameKit.SetDanmakuEnabled(true);
         BroadcastManager.enableDanku = true;
     }
     QGameKit.SetLogDelegate(new QGameKit.LogDelegate(BroadcastManager.LogDelegate));
     QGameKit.SetCommentReceiveDelegate(new QGameKit.CommentReceiveDelegate(BroadcastManager.CommentReceiveDelegate));
     QGameKit.SetLiveStatusDelegate(new QGameKit.LiveStatusChangedDelegate(BroadcastManager.LiveStatusChangedDelegate));
     QGameKit.SetShareDelegate(new QGameKit.ShareDelegate(BroadcastManager.ShareDelegate));
     QGameKit.SetErrorCodeDelegate(new QGameKit.ErrorCodeListenerDelegate(BroadcastManager.ErrorCodeListenerDelegate));
 }