Skip to content

Commit

Permalink
Add custom tests for AudioEncoder.configure parameters (#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Sep 8, 2024
1 parent ece758b commit 07e965c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions custom/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,41 @@ api:
return {result: false, message: 'Audio context is not available'};
}
var instance = reusableInstances.audioContext.destination;
AudioEncoder:
__base: |-
if (!('AudioEncoder' in self)) {
return {result: false, message: 'AudioEncoder is not defined'}
}
var instance = new AudioEncoder({
output: function(){},
error: function(){}
});
configure:
__additional:
bitrateMode: "return bcd.testOptionParam(instance, 'configure', 'bitrateMode', 'constant', {bitrate: 320000, codec: 'mp3', numberOfChannels: 2, sampleRate: 44100});"
opus: "return bcd.testOptionParam(instance, 'configure', 'opus', {}, {bitrate: 320000, codec: 'mp3', numberOfChannels: 2, sampleRate: 44100});"
opus.opus_application: |-
function configure(opus) {
instance.configure({
bitrate: 320000,
codec: 'mp3',
numberOfChannels: 2,
sampleRate: 44100,
opus: opus
});
}
return bcd.testOptionParam(configure, null, 'application', 'voip');
opus.opus_signal: |-
function configure(opus) {
instance.configure({
bitrate: 320000,
codec: 'mp3',
numberOfChannels: 2,
sampleRate: 44100,
opus: opus
});
}
return bcd.testOptionParam(configure, null, 'signal', 'voice');
AudioListener:
__resources:
- audioContext
Expand Down

0 comments on commit 07e965c

Please sign in to comment.