Skip to content

Commit

Permalink
Fix: v3.7.1 better handling of XML changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thedist committed Dec 4, 2024
1 parent 3427ac9 commit e1abdfa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ This module now supports Companions HTTP API, providing endpoints that can be us


# Recent Patches
**v3.7.1**
- Fixed typo in stream 4 and 5 variable definitions
- Better handling of vMix's undocumented XML processing instructions added to the XML API

**v3.7.0**
- Update for vMix 28 beta features
- Added Actions:
Expand Down
4 changes: 4 additions & 0 deletions docs/PATCH_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Patch Notes

**v3.7.1**
- Fixed typo in stream 4 and 5 variable definitions
- Better handling of vMix's undocumented XML processing instructions added to the XML API

**v3.7.0**
- Update for vMix 28 beta features
- Added Actions:
Expand Down
16 changes: 9 additions & 7 deletions src/tcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export class TCP {
this.instance.apiProcessing.response = new Date().getTime()
this.instance.data.update(message)
} else {
// Debugging for issue #159
if (
this.messageBuffer.message.toString().includes('<vmix>') &&
this.messageBuffer.message.toString().includes('</vmix>')
Expand All @@ -261,12 +260,15 @@ export class TCP {
if (dataStart !== -1 && dataStop !== -1) {
const data = this.messageBuffer.message.toString().slice(dataStart, dataStop + 7)

this.instance.log(
'debug',
`Message prefix issue - Message length: ${this.messageBuffer.message.length}, Buffer length: ${
this.messageBuffer.dataLength
}, Full Message: ${this.messageBuffer.message.toString()}`
)
let controlMessage = message.startsWith('<?')
if (!controlMessage) {
this.instance.log(
'debug',
`Message prefix issue - Message length: ${this.messageBuffer.message.length}, Buffer length: ${
this.messageBuffer.dataLength
}, Full Message: ${this.messageBuffer.message.toString()}`
)
}

this.instance.apiProcessing.response = new Date().getTime()
this.instance.data.update(data)
Expand Down

0 comments on commit e1abdfa

Please sign in to comment.