diff --git a/HISTORY.rst b/HISTORY.rst index 2ac8411..7483dc0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -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) ------------------ diff --git a/pyopenvidu/__init__.py b/pyopenvidu/__init__.py index f803a7d..8b2ab9a 100644 --- a/pyopenvidu/__init__.py +++ b/pyopenvidu/__init__.py @@ -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 diff --git a/pyopenvidu/openvidusubscriber.py b/pyopenvidu/openvidusubscriber.py index 525af23..7f9cb14 100644 --- a/pyopenvidu/openvidusubscriber.py +++ b/pyopenvidu/openvidusubscriber.py @@ -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'] - diff --git a/setup.cfg b/setup.cfg index 9bc5fc5..abc2625 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.1 +current_version = 0.1.2 commit = True tag = True diff --git a/setup.py b/setup.py index 380d49c..4f47338 100644 --- a/setup.py +++ b/setup.py @@ -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, ) diff --git a/tests/test_connection.py b/tests/test_connection.py index d7ea7d6..7ded370 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -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": [ @@ -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' diff --git a/tests/test_publisher.py b/tests/test_publisher.py index fe09624..8efaa5e 100644 --- a/tests/test_publisher.py +++ b/tests/test_publisher.py @@ -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": [ @@ -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' diff --git a/tests/test_pyopenvidu.py b/tests/test_pyopenvidu.py index 241b215..4bb6ede 100644 --- a/tests/test_pyopenvidu.py +++ b/tests/test_pyopenvidu.py @@ -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": [ @@ -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' diff --git a/tests/test_session.py b/tests/test_session.py index 92ef313..f68aa94 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -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": [ @@ -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' diff --git a/tests/test_subscriber.py b/tests/test_subscriber.py index ef40576..4e2c29d 100644 --- a/tests/test_subscriber.py +++ b/tests/test_subscriber.py @@ -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": [ @@ -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' @@ -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']