Skip to content

Commit 7cb23da

Browse files
committed
Update video_source.py
1 parent 57ae0ec commit 7cb23da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

livekit-rtc/livekit/rtc/video_source.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from __future__ import annotations
16+
1517
from ._ffi_client import FfiHandle, FfiClient
1618
from ._proto import ffi_pb2 as proto_ffi
1719
from ._proto import video_frame_pb2 as proto_video
1820
from .video_frame import VideoFrame
1921

2022

2123
class VideoSource:
22-
def __init__(self, width: int, height: int) -> None:
24+
def __init__(self, width: int, height: int, is_screencast: bool = False) -> None:
2325
req = proto_ffi.FfiRequest()
2426
req.new_video_source.type = proto_video.VideoSourceType.VIDEO_SOURCE_NATIVE
2527
req.new_video_source.resolution.width = width
2628
req.new_video_source.resolution.height = height
29+
req.new_video_source.is_screencast = is_screencast
2730

2831
resp = FfiClient.instance.request(req)
2932
self._info = resp.new_video_source.source

0 commit comments

Comments
 (0)