Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
momoAmch committed Oct 25, 2024
1 parent e08f5d6 commit 4ac58bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,13 @@ module.exports = function(Cam) {
const service = this.media2Support ? 'media2' : 'media';
const xmlns = this.media2Support ? 'http://www.onvif.org/ver20/media/wsdl' : 'http://www.onvif.org/ver10/media/wsdl';
const ConstantBitRate = (options.rateControl && options.rateControl.$ && options.rateControl.$.ConstantBitRate) || false;
const media2GovLength = (options.$ && options.$.GovLength) || undefined;
const media2Profile = (options.$ && options.$.Profile) || undefined;
this._request({
service: service,
body: this._envelopeHeader() +
`<SetVideoEncoderConfiguration xmlns="${xmlns}">` +
`<Configuration token="${options.token || options.$.token}"` + (options.$.GovLength ? ` GovLength="${options.$.GovLength}"` : '') + (options.$.Profile ? ` Profile="${options.$.Profile}"` : '') + '>' +
`<Configuration token="${options.token || options.$.token}"` + (media2GovLength ? ` GovLength="${media2GovLength}"` : '') + (media2Profile ? ` Profile="${media2Profile}"` : '') + '>' +
( options.name ? '<Name xmlns="http://www.onvif.org/ver10/schema">' + options.name + '</Name>' : '' ) +
( options.useCount ? '<UseCount xmlns="http://www.onvif.org/ver10/schema">' + options.useCount + '</UseCount>' : '' ) +
( options.encoding ? '<Encoding xmlns="http://www.onvif.org/ver10/schema">' + options.encoding + '</Encoding>' : '' ) +
Expand Down

0 comments on commit 4ac58bf

Please sign in to comment.