From aa8976a3d7a4b6199a7b6cdcd05161e280670d1b Mon Sep 17 00:00:00 2001 From: Jacob Mulford <39915377+jmulford-bw@users.noreply.github.com> Date: Tue, 23 Mar 2021 14:34:35 -0400 Subject: [PATCH] WebRtc new field (#21) * New deploy * reverted changes except for webrtc * reverted missing files * git is hard Co-authored-by: jmulford-bw --- src/WebRtc/Models/DeviceApiVersionEnum.php | 24 +++++++++++++++++++ src/WebRtc/Models/Participant.php | 28 ++++++++++++++++------ 2 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 src/WebRtc/Models/DeviceApiVersionEnum.php diff --git a/src/WebRtc/Models/DeviceApiVersionEnum.php b/src/WebRtc/Models/DeviceApiVersionEnum.php new file mode 100644 index 0000000..3ae64f8 --- /dev/null +++ b/src/WebRtc/Models/DeviceApiVersionEnum.php @@ -0,0 +1,24 @@ +id = func_get_arg(0); - $this->callbackUrl = func_get_arg(1); - $this->publishPermissions = func_get_arg(2); - $this->sessions = func_get_arg(3); - $this->subscriptions = func_get_arg(4); - $this->tag = func_get_arg(5); + switch (func_num_args()) { + case 7: + $this->id = func_get_arg(0); + $this->callbackUrl = func_get_arg(1); + $this->publishPermissions = func_get_arg(2); + $this->sessions = func_get_arg(3); + $this->subscriptions = func_get_arg(4); + $this->tag = func_get_arg(5); + $this->deviceApiVersion = func_get_arg(6); + break; + + default: + $this->deviceApiVersion = DeviceApiVersionEnum::V2; + break; } } @@ -80,6 +93,7 @@ public function jsonSerialize() array_values($this->sessions) : null; $json['subscriptions'] = $this->subscriptions; $json['tag'] = $this->tag; + $json['deviceApiVersion'] = $this->deviceApiVersion; return array_filter($json); }