-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from strem-app/feature/add-more-obs-flow-elements
Feature/add more obs flow elements
- Loading branch information
Showing
44 changed files
with
1,092 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Strem.Core.Events; | ||
|
||
public class ShowNotificationEvent | ||
{ | ||
public string Classes { get; } | ||
public string Message { get; } | ||
|
||
public ShowNotificationEvent(string message, string classes = null) | ||
{ | ||
Classes = classes; | ||
Message = message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/Strem.OBS/Components/Tasks/Sources/ChangeSceneTaskComponent.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@using Microsoft.AspNetCore.Components | ||
@using Strem.Core.Components.Tasks | ||
@using Strem.Core.State | ||
@using Strem.OBS.Extensions | ||
@using Strem.OBS.Flows.Tasks | ||
@using Strem.OBS.Services.Client | ||
@using Strem.OBS.Types | ||
|
||
@inherits CustomTaskComponent<ChangeSceneTaskData> | ||
|
||
@inject IAppState AppState; | ||
@inject IObservableOBSClient ObsClient; | ||
|
||
<div class="field"> | ||
<label class="label">Scene Name</label> | ||
<div class="control"> | ||
<AutoComplete @bind-Value="@Data.NewScene" Data="SceneNames"></AutoComplete> | ||
</div> | ||
</div> | ||
|
||
@code { | ||
public override string Title => $"Change Scene To {Data.NewScene}"; | ||
|
||
public string[] SceneNames { get; set; } = Array.Empty<string>(); | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
if (ObsClient.IsConnected) | ||
{ | ||
var scenes = await ObsClient.GetSceneList(); | ||
SceneNames = scenes.Scenes.Select(x => x.Name).ToArray(); | ||
} | ||
else | ||
{ | ||
SceneNames = Array.Empty<string>(); | ||
} | ||
|
||
await base.OnInitializedAsync(); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
src/Strem.OBS/Components/Tasks/Sources/SetRecordingStateTaskComponent.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@using Microsoft.AspNetCore.Components | ||
@using Strem.Core.Components.Tasks | ||
@using Strem.OBS.Flows.Tasks | ||
|
||
@inherits CustomTaskComponent<SetRecordingStateTaskData> | ||
|
||
<div class="field"> | ||
<label class="label">Stream Operation</label> | ||
<div class="control"> | ||
<TrueOrFalse @bind-Value="Data.StartRecording" TrueText="Start Recording" FalseText="Stop Recording"></TrueOrFalse> | ||
</div> | ||
</div> | ||
|
||
|
||
@code { | ||
public override string Title => GetTitle(); | ||
|
||
public string GetTitle() | ||
{ | ||
var starter = Data.StartRecording ? "Start" : "Stop"; | ||
return $"<strong>{starter}</strong> OBS Recording"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Strem.OBS/Components/Tasks/Sources/SetStreamingStateTaskComponent.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@using Microsoft.AspNetCore.Components | ||
@using Strem.Core.Components.Tasks | ||
@using Strem.Core.State | ||
@using Strem.OBS.Extensions | ||
@using Strem.OBS.Flows.Tasks | ||
@using Strem.OBS.Services.Client | ||
@using Strem.OBS.Types | ||
|
||
@inherits CustomTaskComponent<SetStreamStateTaskData> | ||
|
||
<div class="field"> | ||
<label class="label">Stream Operation</label> | ||
<div class="control"> | ||
<TrueOrFalse @bind-Value="Data.StartStream" TrueText="Start Stream" FalseText="Stop Stream"></TrueOrFalse> | ||
</div> | ||
</div> | ||
|
||
|
||
@code { | ||
public override string Title => GetTitle(); | ||
|
||
public string GetTitle() | ||
{ | ||
var starter = Data.StartStream ? "Start" : "Stop"; | ||
return $"<strong>{starter}</strong> OBS Stream"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.