Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added update-live-stream test to exercise patches #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion examples/video/exercise-live-streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@
create_live_stream_request = mux_python.CreateLiveStreamRequest(playback_policy=[mux_python.PlaybackPolicy.PUBLIC], new_asset_settings=new_asset_settings)
create_live_stream_response = live_api.create_live_stream(create_live_stream_request)
logger.print_debug(str(create_live_stream_response))

stream = create_live_stream_response.data
assert create_live_stream_response != None
assert create_live_stream_response.data != None
assert create_live_stream_response.data.id != None
print("create-live-stream OK ✅")

# ========== update-live-stream ==========
update_live_stream_settings = mux_python.UpdateLiveStreamRequest(latency_mode='standard', reconnect_window=35)
updated_stream = live_api.update_live_stream(stream.id, update_live_stream_settings)
assert updated_stream.data.latency_mode == 'standard'
assert updated_stream.data.reconnect_window == 35
print("update-live-stream OK ✅")

# ========== list-live-streams ==========
list_live_streams_response = live_api.list_live_streams()
logger.print_debug(str(list_live_streams_response))
Expand Down Expand Up @@ -95,7 +104,7 @@

# ========== reset-stream-key ==========
live_stream_response_new_stream_key = live_api.reset_stream_key(create_live_stream_response.data.id)
logger.print_debug(live_stream_response_new_stream_key)
print(live_stream_response_new_stream_key)
assert live_stream_response_new_stream_key != None
assert live_stream_response_new_stream_key.data.stream_key != create_live_stream_response.data.stream_key
print("reset-stream-key OK ✅")
Expand Down