Skip to content

🎥 Make videos programmatically with React

lint python SDK

Jonny Burger30c66d8c6377
diff --git a/packages/lambda-python/remotion_lambda/models.py b/packages/lambda-python/remotion_lambda/models.py
index 65907d6515..7df2d11e6e 100644
--- a/packages/lambda-python/remotion_lambda/models.py
+++ b/packages/lambda-python/remotion_lambda/models.py
@@ -133,17 +133,6 @@ class OutNameInputObject:
s3_output_provider: Optional[CustomCredentials] = None
-@dataclass
-class PlayInBrowser:
- """
- Represents the behavior to play content directly in the browser.
-
- Attributes:
- type (str): The type of in-browser action (e.g., 'play-in-browser').
- """
- type: str
-
-
@dataclass
class Download:
"""
@@ -226,12 +215,18 @@ class CostsInfo:
@dataclass
class PlayInBrowser:
+ """
+ The video should play in the browser when the link is clicked.
+ """
type: Literal['play-in-browser']
# You can define additional fields as needed
@dataclass
-class OtherType:
+class ShouldDownload:
+ """
+ The video should download when the link is clicked.
+ """
type: Literal['download']
fileName: str # Additional fields for this type
@@ -276,7 +271,7 @@ class RenderMediaParams:
every_nth_frame: Optional[int] = 1
number_of_gif_loops: Optional[int] = 0
concurrency_per_lambda: Optional[int] = 1
- download_behavior: Optional[Union[PlayInBrowser, OtherType]] = field(
+ download_behavior: Optional[Union[PlayInBrowser, ShouldDownload]] = field(
default_factory=lambda: {'type': 'play-in-browser'})
muted: bool = False
overwrite: bool = False