Skip to content

Commit

Permalink
add stream stage toggle option
Browse files Browse the repository at this point in the history
  • Loading branch information
daniep01 committed Aug 12, 2022
1 parent 75c8284 commit 87215a8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ Retrieve the 'Video Mode', 'Quality' and 'Platform' options from device
Add support for custom streaming profiles

## Version 1.0.5
Add help text
Add help text

## Version 1.0.6
Add streaming control 'Toggle' option
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ instance.prototype.actions = function () {
choices: [
{ id: 'Start', label: 'Start' },
{ id: 'Stop', label: 'Stop' },
{ id: 'Toggle', label: 'Toggle' },
],
},
],
Expand Down Expand Up @@ -505,7 +506,15 @@ instance.prototype.action = function (action) {
var cmd

if (action.action === 'stream') {
cmd = 'STREAM STATE:\nAction: ' + action.options.stream_control + '\n\n'
if (action.options.stream_control === 'Toggle') {
if (self.streaming === 'Streaming') {
cmd = 'STREAM STATE:\nAction: Stop\n\n'
} else {
cmd = 'STREAM STATE:\nAction: Start\n\n'
}
} else {
cmd = 'STREAM STATE:\nAction: ' + action.options.stream_control + '\n\n'
}
self.log('debug', cmd)
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bmd-webpresenterhd",
"version": "1.0.5",
"version": "1.0.6",
"api_version": "1.0.0",
"keywords": [
"Streaming", "Web Encoder", "Livestream"
Expand Down

0 comments on commit 87215a8

Please sign in to comment.