summaryrefslogtreecommitdiffstats
path: root/aglbaseservice.py
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-08 13:43:13 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-09 09:30:14 +0300
commit03471f59045bba8b61d1e3056d75178fe297b57a (patch)
tree86d6cac6b01975b5cba165e06cd2c35827aefef7 /aglbaseservice.py
parentc01603b57d97eba4aac9e62aca9f22da77a2ada0 (diff)
Completed audiomixer api
Diffstat (limited to 'aglbaseservice.py')
-rw-r--r--aglbaseservice.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/aglbaseservice.py b/aglbaseservice.py
index bc4b1d2..2146491 100644
--- a/aglbaseservice.py
+++ b/aglbaseservice.py
@@ -94,6 +94,7 @@ class AFBResponse:
f'[Info: {self.info if hasattr(self,"info") else None}]' \
f'[Data: {self.data if hasattr(self, "data") else None}]'
+
class AGLBaseService:
api: str
url: str
@@ -148,7 +149,7 @@ class AGLBaseService:
exit(1)
URL = f'ws://{self.ip}:{self.port}/api?token={self.token}&uuid={self.uuid}'
- self._conn = connect(close_timeout=0, uri=URL, subprotocols=['x-afb-ws-json1'], ping_timeout=None)
+ self._conn = connect(close_timeout=0, uri=URL, subprotocols=['x-afb-ws-json1'], ping_timeout=None, compression=None)
self.websocket = await self._conn.__aenter__()
return self
@@ -248,7 +249,7 @@ class AGLBaseService:
return msgid
async def subscribe(self, event):
- return await self.request('subscribe', {'value': f'{event}'})
+ return await self.request('subscribe', {'value': f'{event}'}) # some services may use 'event' instead 'value'
async def unsubscribe(self, event):
return await self.request('unsubscribe', {'value': f'{event}'})