Exemplo n.º 1
0
 public void AddModule(Module _newModule)
 {
     EnsureModuleListNotNull();
     _newModule.moduleID = CustomUtil.GetUniqueID(projectName, lastModuleID);
     lastModuleID++;
     modulesList.Add(_newModule);
 }
Exemplo n.º 2
0
 public void AddTask(Task _newTask)
 {
     EnsureTaskListNotNull();
     _newTask.taskID = CustomUtil.GetUniqueID(moduleID, lastTaskID);
     lastTaskID++;
     tasksList.Add(_newTask);
 }
Exemplo n.º 3
0
            public static string CreatePushUrl(string domain, string app, string stream, DateTime expireTime)
            {
                string expireTimeString = expireTime.ToString("s") + "Z";
                string secret           = "qn4ff9kxqxh9u8o9rusne7y1qz04ufrs";
                var    bytes            = CustomUtil.Hmacsha256String(secret, $@"rtmp://{domain}/{app}/{stream};{expireTimeString}");
                var    token            = CustomUtil.Hexbytes2String(bytes);

                return($@"rtmp://{domain}/{app}/{stream}?token={token}&expire={expireTimeString}");
            }
Exemplo n.º 4
0
            public static string CreatePushUrl(string domain, string app, string stream, DateTime expireTime)
            {
                long   unixExpire = CustomUtil.Unix10TimeStamp(expireTime);
                string secret     = "56a2e2438f375ed3e8bf8ea02e7f8d51";
                var    timeHex    = unixExpire.ToString("x8").ToUpper();
                var    token      = CustomUtil.Md5Encrypt($@"{secret}{app}_{stream}{timeHex}", new UTF8Encoding());

                return($@"rtmp://{app}.{domain}/live/{app}_{stream}?bizid={app}&txSecret={token}&txTime={timeHex}");
            }
Exemplo n.º 5
0
 public void AddModules(List <Module> _newModules)
 {
     EnsureModuleListNotNull();
     for (int i = 0; i < _newModules.Count; i++)
     {
         _newModules[i].moduleID = CustomUtil.GetUniqueID(projectName, lastModuleID);
         lastModuleID++;
         modulesList.Add(_newModules[i]);
     }
 }
Exemplo n.º 6
0
 public void AddTasks(List <Task> _newTasks)
 {
     EnsureTaskListNotNull();
     for (int i = 0; i < _newTasks.Count; i++)
     {
         _newTasks[i].taskID = CustomUtil.GetUniqueID(moduleID, lastTaskID);
         lastTaskID++;
         tasksList.Add(_newTasks[i]);
     }
 }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public ICursorSettings GetSettings()
        {
            if (vSettings != null)
            {
                return(vSettings);
            }

            ICursorSettings sett = GetSettingsInner();

            CustomUtil.VerifyRenderer <IUiCursorRenderer>(sett.Renderer, null, "Hovercursor", "Cursor");
            vSettings = sett;
            return(sett);
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public IProjectionVisualSettings GetSettings()
        {
            if (vSettings != null)
            {
                return(vSettings);
            }

            IProjectionVisualSettings sett = GetSettingsInner();

            CustomUtil.VerifyRenderer <IUiProjectionRenderer>(
                sett.Renderer, null, "Hoverboard", "Projection");

            vSettings = sett;
            return(sett);
        }
Exemplo n.º 9
0
            public static string CreatePlayUrl(string domain, string app, string stream, DateTime expireTime, PlayType type)
            {
                string secret    = "qn4ff9kxqxh9u8o9rusne7y1qz04ufrs";
                var    timeStamp = CustomUtil.Unix10TimeStamp(expireTime);
                var    md5       = CustomUtil.Md5Encrypt($@"{secret}/{domain}/{app}/{stream}{expireTime}", new UTF8Encoding());

                switch (type)
                {
                case PlayType.flv:
                {
                    return($@"http://{domain}/{app}/{stream}.flv?timestamp={timeStamp}&secret={md5}");
                }

                default:
                {
                    return($@"http://{domain}/{app}/{stream}?timestamp={timeStamp}&secret={md5}");
                }
                }
            }