public DjLiveService(string host, string hostUrl, string userName, string password, int port = 22) { this._host = host; this._hostUrl = hostUrl; this._username = userName; this._password = password; _port = port; _apiUrl = hostUrl + ":1985"; ApiUrlManager.Init(_apiUrl); }
public DjLiveService(LiveServiceConfig config) { this._host = config.Host; this._hostUrl = config.HostUrl; this._username = config.UserName; this._password = config.Password; _port = config.SshPort; _apiPort = config.ApiPort; _httpPort = config.HttpPort; rtmpPort = config.RtmpPort; _apiUrl = _hostUrl + $":{_apiPort}"; ApiUrlManager.Init(_apiUrl); }
public DjLiveService() { var reader = new System.Configuration.AppSettingsReader(); _host = (string)reader.GetValue("host", typeof(string)); _hostUrl = (string)reader.GetValue("hostUrl", typeof(string)); _apiUrl = (string)reader.GetValue("apiUrl", typeof(string)); _username = (string)reader.GetValue("userName", typeof(string)); _password = (string)reader.GetValue("password", typeof(string)); _port = (int)reader.GetValue("port", typeof(int)); _apiUrl = string.IsNullOrEmpty(_apiUrl)?_hostUrl + $":{_apiPort}" : _apiUrl; ApiUrlManager.Init(_apiUrl); }