Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-seifert committed Sep 21, 2021
1 parent 9c48d95 commit 4699360
Show file tree
Hide file tree
Showing 6 changed files with 639 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
package-lock.json
package-lock.json
.DS_Store
38 changes: 38 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## VDO.Ninja

Control [VDO.Ninja](https://vdo.ninja) stream settings remotely.

### Configuration

- Use VDO.Ninja 19 or above
- Add an API ID as a URL parameter (ex. `&api=xxxxxx`) to your VDO.Ninja link
- Enter the same API ID in the module settings

### Available Actions

#### General

- Mic Control
- Speaker Control
- Speaker Volume
- Camera Control
- Record Local Video
- Reload Current Page
- Hang Up Current Connection
- Send Chat Message
- Set Bitrate
- Set Panning
- Raise Hand
- Toggle Screen Share

#### Control Rooms

- Room Guest: Mute/Unmute Guest
- Room Guest: Deafen/Un-Deafen Guest
- Room Guest: Mic Volume
- Room Guest: Hang Up
- Room Guest: Transfer
- Room Guest: Add to Scene
- Room Guest: Mute Guest in Scene
- Room Guest: Blind/Un-Blind Guest
- Room Guest: Highlight Guest
338 changes: 338 additions & 0 deletions actions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
module.exports = {
getActions() {
let actions = {}

let mutableChoices = [
{ id: 'true', label: 'Unmute' },
{ id: 'false', label: 'Mute' },
{ id: 'toggle', label: 'Toggle' },
]

actions['mic'] = {
label: 'Mic Control',
options: [
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'true',
choices: mutableChoices,
required: true,
},
],
}

actions['speaker'] = {
label: 'Speaker Control',
options: [
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'true',
choices: mutableChoices,
required: true,
},
],
}

actions['volume'] = {
label: 'Speaker Volume',
options: [
{
type: 'number',
label: 'Volume (0 to 100)',
id: 'value',
default: 100,
min: 0,
max: 100,
range: false,
required: true,
},
],
}

actions['camera'] = {
label: 'Camera Control',
options: [
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'true',
choices: mutableChoices,
required: true,
},
],
}

actions['record'] = {
label: 'Record Local Video',
options: [
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'true',
choices: [
{ id: 'true', label: 'Start Recording' },
{ id: 'false', label: 'Stop Recording' },
],
required: true,
},
],
}

actions['reload'] = {
label: 'Reload Current Page',
}

actions['hangup'] = {
label: 'Hang Up Current Connection',
}

actions['sendChat'] = {
label: 'Send Chat Message',
options: [
{
type: 'textinput',
label: 'Message',
id: 'value',
default: '',
required: true,
},
],
}

actions['bitrate'] = {
label: 'Set Bitrate',
options: [
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'true',
choices: [
{ id: 'true', label: 'Reset bitrate' },
{ id: 'false', label: 'Pause all currently incoming video' },
{ id: 'custom', label: 'Custom Bitrate' },
],
required: true,
},
{
type: 'number',
label: 'Bitrate in kbps (Must select "Custom" above)',
id: 'bitrate',
default: 1500,
min: 0,
range: false,
required: true,
},
],
}

actions['panning'] = {
label: 'Set Panning',
options: [
{
type: 'number',
label: 'Pan (0 [Left] to 180 [Right], 90 [Center])',
id: 'value',
default: 90,
min: 0,
max: 180,
range: false,
required: true,
},
],
}

actions['togglehand'] = {
label: 'Raise Hand',
}

actions['togglescreenshare'] = {
label: 'Toggle Screen Share',
}

actions['guestMic'] = {
label: 'Room Guest: Mute/Unmute Guest',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'toggle',
choices: mutableChoices,
required: true,
},
],
}

actions['guestSpeaker'] = {
label: 'Room Guest: Deafen/Un-Deafen Guest',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'dropdown',
label: 'Action',
id: 'value',
default: 'toggle',
choices: mutableChoices,
required: true,
},
],
}

actions['guestVolume'] = {
label: 'Room Guest: Mic Volume',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'number',
label: 'Volume (0 to 200)',
id: 'value',
default: 100,
min: 0,
max: 200,
range: false,
required: true,
},
],
}

actions['guestHangup'] = {
label: 'Room Guest: Hang Up',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
],
}

actions['guestForward'] = {
label: 'Room Guest: Transfer',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'textinput',
label: 'Destination Room (room ID)',
id: 'value',
default: '',
required: true,
},
],
}

actions['guestAddScene'] = {
label: 'Room Guest: Add to Scene',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'textinput',
label: 'Scene (1-8, or custom scene name)',
id: 'value',
default: '1',
required: true,
},
],
}

actions['guestMuteScene'] = {
label: 'Room Guest: Mute Guest in Scene',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
{
type: 'textinput',
label: 'Scene (1-8, or custom scene name)',
id: 'value',
default: '1',
required: true,
},
],
}

actions['guestDisplay'] = {
label: 'Room Guest: Blind/Un-Blind Guest',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
],
}

actions['guestSoloVideo'] = {
label: 'Room Guest: Highlight Guest',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
],
}

actions['guestForceKeyframe'] = {
label: 'Room Guest: Send Keyframe',
description: 'Helps resolve rainbow puke',
options: [
{
type: 'textinput',
label: 'Guest (number or stream ID)',
id: 'target',
default: '1',
required: true,
},
],
}

return actions
},
}
Loading

0 comments on commit 4699360

Please sign in to comment.