示例#1
0
        private SOBSSource _translateSource(OBSSourceItem input, int index = 0)
        {
            SOBSSource source = new SOBSSource();

            source.Id     = _uidFromString(input.Name + "_" + index.ToString());
            source.Index  = index;
            source.Name   = input.Name;
            source.Muted  = input.Muted;
            source.Video  = false;
            source.Audio  = _sourceHasAudio(input.TypeId);
            source.Type   = input.Type;
            source.Volume = 0;
            return(source);
        }
示例#2
0
        private void onSourceOrderChange(OBSWebsocket sender, string sceneName)
        {
            websocket.SendRequestAsync(delegate(JObject r)
            {
                JArray items = (JArray)r["sources"];
                SourceItems.Clear();
                foreach (JObject data in items)
                {
                    OBSSourceItem s = new OBSSourceItem(data);
                    SourceItems.Add(s);
                }

                websocket.SendRequestAsync(delegate(JObject x) {
                    currentSceneLoaded(new OBSScene(x));
                }, "GetCurrentScene");
            }, "GetSourcesList");
        }