Some fixes

This commit is contained in:
WolverinDEV 2019-09-05 20:11:47 +02:00
parent a68a7b6119
commit 453802698e
3 changed files with 14 additions and 0 deletions

View File

@ -136,6 +136,14 @@ export namespace _audio {
encoding_supported(codec: number): boolean {
return this.handle.encoding_supported(codec);
}
get_encoder_codec(): number {
return this.handle.get_encoder_codec();
}
set_encoder_codec(codec: number) {
return this.handle.set_encoder_codec(codec);
}
}
}
}

View File

@ -39,6 +39,9 @@ declare module "teaclient_connection" {
decoding_supported(codec: number) : boolean;
encoding_supported(codec: number) : boolean;
get_encoder_codec() : number;
set_encoder_codec(codec: number);
}
export interface NativeServerConnection {

View File

@ -44,6 +44,9 @@ NAN_MODULE_INIT(VoiceConnectionWrap::Init) {
Nan::SetPrototypeMethod(klass, "audio_source", VoiceConnectionWrap::_audio_source);
Nan::SetPrototypeMethod(klass, "set_audio_source", VoiceConnectionWrap::_set_audio_source);
Nan::SetPrototypeMethod(klass, "get_encoder_codec", VoiceConnectionWrap::_get_encoder_codec);
Nan::SetPrototypeMethod(klass, "set_encoder_codec", VoiceConnectionWrap::_set_encoder_codec);
constructor().Reset(Nan::GetFunction(klass).ToLocalChecked());
}