コード例 #1
0
        /// <summary>
        /// List every available scene
        /// </summary>
        /// <returns>A <see cref="List{OBSScene}" /> of <see cref="OBSScene"/> objects describing each scene</returns>
        public async Task <List <OBSScene> > ListScenes()
        {
            JObject response = await SendRequest("GetSceneList");

            JArray items  = (JArray)response["scenes"];
            var    scenes = new List <OBSScene>();

            foreach (JObject sceneData in items)
            {
                OBSScene scene = new OBSScene(sceneData);
                scenes.Add(scene);
            }

            return(scenes);
        }
コード例 #2
0
 /// <summary>
 /// Set the relative crop coordinates of the specified source item
 /// </summary>
 /// <param name="sceneItem">Scene item object</param>
 /// <param name="cropInfo">Crop coordinates</param>
 /// <param name="scene">Parent scene of scene item</param>
 public void SetSceneItemCrop(SceneItem sceneItem,
                              SceneItemCropInfo cropInfo, OBSScene scene)
 {
     SetSceneItemCrop(sceneItem.SourceName, cropInfo, scene.Name);
 }
コード例 #3
0
 /// <summary>
 /// Change the currently active preview scene to the one specified.
 /// Triggers an error if Studio Mode is disabled.
 /// </summary>
 /// <param name="previewScene">Preview scene object</param>
 public void SetPreviewScene(OBSScene previewScene)
 {
     SetPreviewScene(previewScene.Name);
 }