Skip to content

Commit

Permalink
Merge pull request #4 from marcsello/dev
Browse files Browse the repository at this point in the history
Release 0.1.2
  • Loading branch information
marcsello authored Apr 7, 2020
2 parents 0ef311b + 6232cca commit 147d1ce
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 28 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

0.1.2 (2020-04-07)
------------------

* Removed publisher property of the OpenViduSubscriber object, as it was removed from the OpenVidu Server as well.

0.1.1 (2020-04-04)
------------------

Expand Down
2 changes: 1 addition & 1 deletion pyopenvidu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Marcell Pünkösd"""
__email__ = 'punkosdmarcell@rocketmail.com'
__version__ = '0.1.1'
__version__ = '0.1.2'

from .openvidu import OpenVidu

Expand Down
3 changes: 0 additions & 3 deletions pyopenvidu/openvidusubscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ class OpenViduSubscriber(object):
session_id: str
stream_id: str
created_at: datetime
publisher: str

def __init__(self, session: BaseUrlSession, session_id: str, data: dict):
self._session = session
self.session_id = session_id
self.stream_id = data['streamId']
self.created_at = datetime.utcfromtimestamp(data['createdAt'] / 1000.0)
self.publisher = data['publisher']

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.1
current_version = 0.1.2
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"Code": "https://github.com/marcsello/pyopenvidu",
"Issue tracker": "https://github.com/marcsello/pyopenvidu/issues",
},
version='0.1.1',
version='0.1.2',
zip_safe=False,
)
8 changes: 4 additions & 4 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False},
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"
}]}]}, "recording": False},
{"sessionId": "TestSession2", "createdAt": 1538482606338, "mediaMode": "ROUTED", "recordingMode": "MANUAL",
"defaultOutputMode": "COMPOSED", "defaultRecordingLayout": "BEST_FIT", "customSessionId": "TestSession",
"connections": {"numberOfElements": 2, "content": [
Expand All @@ -43,8 +43,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False}
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"}]}]},
"recording": False}
]}
SECRET = 'MY_SECRET'

Expand Down
8 changes: 4 additions & 4 deletions tests/test_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False},
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"
}]}]}, "recording": False},
{"sessionId": "TestSession2", "createdAt": 1538482606338, "mediaMode": "ROUTED", "recordingMode": "MANUAL",
"defaultOutputMode": "COMPOSED", "defaultRecordingLayout": "BEST_FIT", "customSessionId": "TestSession",
"connections": {"numberOfElements": 2, "content": [
Expand All @@ -44,8 +44,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False}
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"}]}]},
"recording": False}
]}
SECRET = 'MY_SECRET'

Expand Down
9 changes: 5 additions & 4 deletions tests/test_pyopenvidu.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False},
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"
}]}]}, "recording": False},
{"sessionId": "TestSession2", "createdAt": 1538482606338, "mediaMode": "ROUTED", "recordingMode": "MANUAL",
"defaultOutputMode": "COMPOSED", "defaultRecordingLayout": "BEST_FIT", "customSessionId": "TestSession",
"connections": {"numberOfElements": 2, "content": [
Expand All @@ -43,9 +43,10 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False}
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"}]}]},
"recording": False}
]}

SECRET = 'MY_SECRET'


Expand Down
8 changes: 4 additions & 4 deletions tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False},
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"
}]}]}, "recording": False},
{"sessionId": "TestSession2", "createdAt": 1538482606338, "mediaMode": "ROUTED", "recordingMode": "MANUAL",
"defaultOutputMode": "COMPOSED", "defaultRecordingLayout": "BEST_FIT", "customSessionId": "TestSession",
"connections": {"numberOfElements": 2, "content": [
Expand All @@ -44,8 +44,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False}
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"}]}]},
"recording": False}
]}
SECRET = 'MY_SECRET'

Expand Down
10 changes: 4 additions & 6 deletions tests/test_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False},
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"
}]}]}, "recording": False},
{"sessionId": "TestSession2", "createdAt": 1538482606338, "mediaMode": "ROUTED", "recordingMode": "MANUAL",
"defaultOutputMode": "COMPOSED", "defaultRecordingLayout": "BEST_FIT", "customSessionId": "TestSession",
"connections": {"numberOfElements": 2, "content": [
Expand All @@ -43,8 +43,8 @@
"token": "wss://localhost:4443?sessionId=TestSession&token=ovj1b4ysuqmcirti&role=PUBLISHER&turnUsername=INOAHN&turnCredential=oujrqd",
"role": "PUBLISHER", "serverData": "", "clientData": "TestClient2", "publishers": [],
"subscribers": [
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU",
"publisher": "vhdxz7abbfirh2lh"}]}]}, "recording": False}
{"createdAt": 1538482607799, "streamId": "vhdxz7abbfirh2lh_CAMERA_CLVAU"}]}]},
"recording": False}
]}
SECRET = 'MY_SECRET'

Expand Down Expand Up @@ -81,5 +81,3 @@ def test_properties(connection_instance):
assert s.created_at == datetime.utcfromtimestamp(
SESSIONS['content'][0]['connections']['content'][1]['subscribers'][0]['createdAt'] / 1000.0
)

assert s.publisher == SESSIONS['content'][0]['connections']['content'][1]['subscribers'][0]['publisher']

0 comments on commit 147d1ce

Please sign in to comment.