Skip to content

Commit ba26dcc

Browse files
authored
move protocol to livekit-protocol package (#89)
1 parent 1f7ce70 commit ba26dcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+691
-6568
lines changed

.github/workflows/build-api.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ jobs:
3030
run: |
3131
pip3 install build wheel
3232
python3 -m build --wheel
33-
env:
34-
CIBW_ARCHS: ${{ matrix.archs }}
35-
CIBW_SKIP: "*-musllinux_*"
3633
3734
- name: Build SDist
3835
run: pipx run build --sdist
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build Protocol
2+
3+
on:
4+
push:
5+
paths:
6+
- livekit-protocol/**
7+
pull_request:
8+
paths:
9+
- livekit-protocol/**
10+
workflow_dispatch:
11+
12+
env:
13+
PACKAGE_DIR: ./livekit-protocol
14+
15+
jobs:
16+
build_wheels:
17+
name: Build Protocol wheel/sdist
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: ${{ env.PACKAGE_DIR }}
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
submodules: true
26+
27+
- uses: actions/setup-python@v4
28+
29+
- name: Build wheel
30+
run: |
31+
pip3 install build wheel
32+
python3 -m build --wheel
33+
34+
- name: Build SDist
35+
run: pipx run build --sdist
36+
37+
- uses: actions/upload-artifact@v3
38+
with:
39+
name: protocol-release
40+
path: |
41+
livekit-protocol/dist/*.whl
42+
livekit-protocol/dist/*.tar.gz
43+
44+
publish:
45+
name: Publish Protocol release
46+
needs: build_wheels
47+
runs-on: ubuntu-latest
48+
permissions:
49+
id-token: write
50+
if: startsWith(github.ref, 'refs/tags/protocol-v')
51+
steps:
52+
- uses: actions/download-artifact@v3
53+
with:
54+
name: protocol-release
55+
path: dist
56+
57+
- uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
user: __token__
60+
password: ${{ secrets.PYPI_API_TOKEN }}
61+

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
path = livekit-rtc/rust-sdks
33
url = https://github.com/livekit/rust-sdks
44
[submodule "livekit-api/protocol"]
5-
path = livekit-api/protocol
5+
path = livekit-protocol/protocol
66
url = https://github.com/livekit/protocol

examples/e2ee.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
WIDTH, HEIGHT = 1280, 720
1515

16+
1617
async def draw_cube(source: rtc.VideoSource):
1718
MID_W, MID_H = 640, 360
1819
cube_size = 60

examples/publish_hue.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
WIDTH, HEIGHT = 1280, 720
1313

14+
1415
async def draw_color_cycle(source: rtc.VideoSource):
1516
argb_frame = rtc.ArgbFrame.create(rtc.VideoFormatType.FORMAT_ARGB, WIDTH, HEIGHT)
1617
arr = np.frombuffer(argb_frame.data, dtype=np.uint8)

livekit-api/livekit/api/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
"""
1717

1818
# flake8: noqa
19-
from ._proto.livekit_egress_pb2 import *
20-
from ._proto.livekit_models_pb2 import *
21-
from ._proto.livekit_room_pb2 import *
22-
from ._proto.livekit_ingress_pb2 import *
23-
from .version import __version__
19+
from livekit.protocol.egress import *
20+
from livekit.protocol.ingress import *
21+
from livekit.protocol.models import *
22+
from livekit.protocol.room import *
23+
2424
from .access_token import VideoGrants, AccessToken
2525
from .room_service import RoomService
26+
from .version import __version__

livekit-api/livekit/api/_proto/__init__.py

Whitespace-only changes.

livekit-api/livekit/api/_proto/livekit_models_pb2.py

Lines changed: 0 additions & 106 deletions
This file was deleted.

livekit-api/livekit/api/room_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from ._proto import livekit_models_pb2 as proto_models
2-
from ._proto import livekit_room_pb2 as proto_room
1+
from livekit.protocol import room as proto_room
2+
from livekit.protocol import models as proto_models
33
from ._service import Service
44
from .access_token import VideoGrants
55

livekit-api/protocol

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)