-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathKineticReaderInterop.cs
More file actions
40 lines (32 loc) · 1.2 KB
/
KineticReaderInterop.cs
File metadata and controls
40 lines (32 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Microsoft.JSInterop;
namespace PrompterOne.Shared.Services;
public sealed class KineticReaderInterop(IJSRuntime jsRuntime)
{
private readonly IJSRuntime _jsRuntime = jsRuntime;
public ValueTask ActivateWordAsync(
int durationMs,
IReadOnlyList<string> cueTags,
double playbackRate) =>
_jsRuntime.InvokeVoidAsync(
KineticReaderInteropMethodNames.ActivateWord,
durationMs,
cueTags,
playbackRate);
public ValueTask ClearAsync() =>
_jsRuntime.InvokeVoidAsync(KineticReaderInteropMethodNames.ClearAll);
public ValueTask CommitFrameAsync() =>
_jsRuntime.InvokeVoidAsync(KineticReaderInteropMethodNames.CommitFrame);
public ValueTask HideLensAsync(string lensId) =>
_jsRuntime.InvokeVoidAsync(KineticReaderInteropMethodNames.HideLens, lensId);
public ValueTask PositionLensAsync(
string lensId,
string targetId,
IReadOnlyList<string> cueTags,
int targetDurationMs) =>
_jsRuntime.InvokeVoidAsync(
KineticReaderInteropMethodNames.PositionLens,
lensId,
targetId,
cueTags,
targetDurationMs);
}