-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hexalie Stream Utility.sef
83 lines (80 loc) · 2.5 KB
/
Hexalie Stream Utility.sef
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[extension_name]
Hexalie Stream Utility
[extension_info]
[extension_version]
0.0.1
[insert_external]
<script>
let hstws;
function hstconnect() {
hstws = new WebSocket("ws://localhost:8069");
hstws.onopen = (event) => {
SAMMI.alert("[HexalieStreamUtility] Connected to Websocket Server");
}
hstws.onmessage = (event) => {
console.log(JSON.parse(event.data));
}
hstws.onclose = (event) => {
SAMMI.alert("Hexalie Stream Util connection closed. Reconnecting in 5 seconds...");
setTimeout(hstconnect(), 5000);
}
}
hstconnect();
</script>
[insert_command]
SAMMI.extCommand('HST - Video', 3355443, 52, {
src: ['Video File', 22, 'media/'],
positionX: ['Position X', 14 , "50%"],
randomX: ['Random X Position', 2, true],
positionY: ['Position Y', 14 , "50%"],
randomY: ['Random Y Position', 2, true],
width: ['Width', 14, "600"],
height: ['Height', 14, ""],
volume: ['Volume', 11, 1]
});
SAMMI.extCommand('HST - Image', 3355443, 52, {
src: ['Image File', 22, 'media/'],
positionX: ['Position X', 14 , "50%"],
randomX: ['Random X Position', 2, true],
positionY: ['Position Y', 14 , "50%"],
randomY: ['Random Y Position', 2, true],
width: ['Width', 14, "600"],
height: ['Height', 14, ""],
duration: ['Duration (seconds)', 14, "5"]
});
SAMMI.extCommand('HST - Text', 3355443, 52, {
text: ['Text', 14, ''],
positionX: ['Position X', 14 , "50%"],
randomX: ['Random X Position', 2, true],
positionY: ['Position Y', 14 , "50%"],
randomY: ['Random Y Position', 2, true],
duration: ['Duration (seconds)', 14, "5"],
class: ['HTML Class', 14, ""],
css: ['Custom CSS', 0, ""]
});
SAMMI.extCommand("HST - Audio", 3355443, 52, {
src: ['Audio File', 22, 'media/'],
volume: ['Volume', 11, 1]
});
[insert_hook]
case 'HST - Video': {
hstSend(SAMMIJSON, "video");
} break
case 'HST - Image': {
hstSend(SAMMIJSON, "image");
} break
case 'HST - Text': {
hstSend(SAMMIJSON, "text");
} break
case 'HST - Audio': {
hstSend(SAMMIJSON, "audio");
}
[insert_script]
function hstSend(jsonObj, type){
let message = {
type: type,
data: jsonObj
}
hstws.send(JSON.stringify(message));
}
[insert_over]