File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717import time
1818from dataclasses import dataclass
19- from typing import AsyncIterator , Optional
19+ from typing import AsyncIterator , Optional , TypedDict
2020
2121from ._ffi_client import FfiClient , FfiHandle
2222from ._proto import ffi_pb2 as proto_ffi
@@ -62,8 +62,7 @@ class DataTrackInfo:
6262 """Whether or not frames sent on the track use end-to-end encryption."""
6363
6464
65- @dataclass
66- class DataTrackOptions :
65+ class DataTrackOptions (TypedDict ):
6766 """Options for publishing a data track."""
6867
6968 name : str
Original file line number Diff line number Diff line change @@ -694,7 +694,7 @@ async def publish_data_track(
694694 if isinstance (options , str ):
695695 options = DataTrackOptions (name = options )
696696
697- proto_opts = proto_data_track .DataTrackOptions (name = options . name )
697+ proto_opts = proto_data_track .DataTrackOptions (name = options [ " name" ] )
698698
699699 req = proto_ffi .FfiRequest ()
700700 req .publish_data_track .local_participant_handle = self ._ffi_handle .handle
You can’t perform that action at this time.
0 commit comments