You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:param String 'session_id': The session ID of the OpenTok session that will include the Experience Composer stream.
1654
+
:param String 'token': A valid OpenTok token with a Publisher role and (optionally) connection data to be associated with the output stream.
1655
+
:param String 'url': A publically reachable URL controlled by the customer and capable of generating the content to be rendered without user intervention.
1656
+
:param Integer 'maxDuration' Optional: The maximum time allowed for the Experience Composer, in seconds. After this time, it is stopped automatically, if it is still running. The maximum value is 36000 (10 hours), the minimum value is 60 (1 minute), and the default value is 7200 (2 hours). When the Experience Composer ends, its stream is unpublished and an event is posted to the callback URL, if configured in the Account Portal.
1657
+
:param String 'resolution' Optional: The resolution of the Experience Composer, either "640x480" (SD landscape), "480x640" (SD portrait), "1280x720" (HD landscape), "720x1280" (HD portrait), "1920x1080" (FHD landscape), or "1080x1920" (FHD portrait). By default, this resolution is "1280x720" (HD landscape, the default).
1658
+
:param Dictionary 'properties' Optional: Initial configuration of Publisher properties for the composed output stream.
1659
+
String name Optional: The name of the composed output stream which will be published to the session. The name must have a minimum length of 1 and a maximum length of 200.
1660
+
"""
1661
+
payload= {
1662
+
"sessionId": session_id,
1663
+
"token": opentok_token,
1664
+
"url": url,
1665
+
"maxDuration": max_duration,
1666
+
"resolution": resolution,
1667
+
"properties": properties
1668
+
}
1669
+
1670
+
logger.debug(
1671
+
"POST to %r with params %r, headers %r, proxies %r",
1672
+
self.endpoints.get_render_url(),
1673
+
json.dumps(payload),
1674
+
self.get_json_headers(),
1675
+
self.proxies,
1676
+
)
1677
+
1678
+
response=requests.post(
1679
+
self.endpoints.get_render_url(),
1680
+
json=payload,
1681
+
headers=self.get_json_headers(),
1682
+
proxies=self.proxies,
1683
+
timeout=self.timeout,
1684
+
)
1685
+
1686
+
ifresponseandresponse.status_code==202:
1687
+
returnRender(response.json())
1688
+
elifresponse.status_code==400:
1689
+
"""
1690
+
The HTTP response has a 400 status code in the following cases:
1691
+
You do not pass in a session ID or you pass in an invalid session ID.
1692
+
You specify an invalid value for input parameters.
1693
+
"""
1694
+
raiseRequestError(response.json().get("message"))
1695
+
elifresponse.status_code==403:
1696
+
raiseAuthError("You passed in an invalid OpenTok API key or JWT token.")
0 commit comments