Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Add python hls example (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolk99 authored Jan 5, 2024
1 parent 2c25472 commit e8e06ce
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/getting_started/components/hls.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,20 @@ hls_options = %Jellyfish.Component.HLS{subscribe_mode: :manual}
<TabItem value="python" label="Python">

```python
TODO
from jellyfish import RoomApi, ComponentOptionsHLS, PeerOptionsWebRTC

server_address = "localhost:5002"
server_api_token = "development"

room_api = RoomApi(server_address='localhost:5002', server_api_token='development')

jellyfish_address, room = room_api.create_room(video_codec='h264')
peer_token, peer = room_api.add_peer(room.id, options=PeerOptionsWebRTC())

hls_options = ComponentOptionsHLS(subscribe_mode="manual")
component_hls = room_api.add_component(room.id, options=hls_options)

room_api.hls_subscribe(room.id, [peer.id])
```

</TabItem>
Expand Down

0 comments on commit e8e06ce

Please sign in to comment.