Skip to content

Commit

Permalink
#22 / #33 fix - updates from page/playlist number on OSC changes with…
Browse files Browse the repository at this point in the history
… Songbeamer 6.04a
  • Loading branch information
bensteUEM committed Jun 15, 2023
1 parent 9a1fba3 commit 34c208d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,24 +349,6 @@ export function getActionDefinitions(self, osc) {
'debug',
`Sent OSC to ${self.config.host}:${self.config.port} with ${path} and ${JSON.stringify(args)}`
)
// Remove the following lines once propper feedback is implemented in songbeamer - see #22
self.log(
'info',
'Songbeamer OSC implementation is missing feedback for page/playlist changes #22 manually requesting variables'
)
self.log('info', 'Songbeamer OSC reports wrong page numbers after update via OSC #30')
osc.send({
address: '/playlist/itemindex',
args: [],
})
osc.send({
address: '/presentation/page',
args: [],
})
osc.send({
address: '/presentation/presentation_pagecount',
args: [],
})
},
},
video_state: {
Expand Down
9 changes: 9 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ class SongbeamerInstance extends InstanceBase {
this.setVariableValues({ presentation_page: value })
this.checkFeedbacks('presentation_page')
break
case '/presentation/nextpage':
case '/presentation/prevpage':
this.log('debug', `/presentation/nextpage or /presentation/nextpage ${value}`)
break
case '/presentation/pagecount':
this.log('debug', `/presentation/pagecount ${value}`)
this.setVariableValues({ presentation_pagecount: value })
Expand Down Expand Up @@ -177,6 +181,10 @@ class SongbeamerInstance extends InstanceBase {
this.setVariableValues({ playlist_itemindex: value + 1 })
this.checkFeedbacks('playlist_itemindex')
break
case '/playlist/previous':
case '/playlist/next':
this.log('debug', `/playlist/previous or /playlist/next ${value}`)
break
case '/playlist/count':
this.log('warn', `/playlist/count ${value} not yet implemented`)
break
Expand Down Expand Up @@ -219,6 +227,7 @@ class SongbeamerInstance extends InstanceBase {
*/
this.osc.on('ready', () => {
this.log('info', 'OSC port is in "ready" state')
self.osc_update_polling()
this.heartbeat = setInterval(function () {
self.osc_update_polling()
}, 9500) // just before 10 sec expiration
Expand Down

1 comment on commit 34c208d

@bensteUEM
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#30 not #33

Please sign in to comment.