flet-video 0.70.0.dev6365__tar.gz → 0.70.0.dev6370__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flet-video might be problematic. Click here for more details.

Files changed (24) hide show
  1. {flet_video-0.70.0.dev6365/src/flet_video.egg-info → flet_video-0.70.0.dev6370}/PKG-INFO +2 -2
  2. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/pyproject.toml +2 -2
  3. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video/types.py +1 -1
  4. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video/video.py +19 -13
  5. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370/src/flet_video.egg-info}/PKG-INFO +2 -2
  6. flet_video-0.70.0.dev6370/src/flet_video.egg-info/requires.txt +1 -0
  7. flet_video-0.70.0.dev6365/src/flet_video.egg-info/requires.txt +0 -1
  8. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/LICENSE +0 -0
  9. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/README.md +0 -0
  10. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/setup.cfg +0 -0
  11. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video/__init__.py +0 -0
  12. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video.egg-info/SOURCES.txt +0 -0
  13. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video.egg-info/dependency_links.txt +0 -0
  14. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flet_video.egg-info/top_level.txt +0 -0
  15. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/LICENSE +0 -0
  16. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/analysis_options.yaml +0 -0
  17. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/flet_video.dart +0 -0
  18. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/src/extension.dart +0 -0
  19. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/src/utils/file_utils_io.dart +0 -0
  20. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/src/utils/file_utils_web.dart +0 -0
  21. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/src/utils/video.dart +0 -0
  22. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/lib/src/video.dart +0 -0
  23. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/pubspec.lock +0 -0
  24. {flet_video-0.70.0.dev6365 → flet_video-0.70.0.dev6370}/src/flutter/flet_video/pubspec.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-video
3
- Version: 0.70.0.dev6365
3
+ Version: 0.70.0.dev6370
4
4
  Summary: Cross-platform video playback for Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -11,7 +11,7 @@ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet==0.70.0.dev6365
14
+ Requires-Dist: flet==0.70.0.dev6370
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-video
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "flet-video"
3
- version = "0.70.0.dev6365"
3
+ version = "0.70.0.dev6370"
4
4
  description = "Cross-platform video playback for Flet apps."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Flet contributors", email = "hello@flet.dev" }]
7
7
  license = "Apache-2.0"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "flet==0.70.0.dev6365",
10
+ "flet==0.70.0.dev6370",
11
11
  ]
12
12
 
13
13
  [project.urls]
@@ -87,7 +87,7 @@ class VideoConfiguration:
87
87
  scale: ft.Number = 1.0
88
88
  """
89
89
  The scale for the video output.
90
- Specifying this option will cause [`width`][..] & [`height`][..] to be ignored.
90
+ Specifying this option will cause [`width`][(c).] & [`height`][(c).] to be ignored.
91
91
  """
92
92
 
93
93
 
@@ -86,8 +86,7 @@ class Video(ft.LayoutControl):
86
86
  An exception will be raised if the value is outside this range.
87
87
 
88
88
  Raises:
89
- AssertionError: If the [`volume`][(c).] is not between
90
- `0.0` and `100.0` (inclusive).
89
+ ValueError: If its value is not between `0.0` and `100.0` (inclusive).
91
90
  """
92
91
 
93
92
  playback_rate: ft.Number = 1.0
@@ -119,7 +118,7 @@ class Video(ft.LayoutControl):
119
118
  resume_upon_entering_foreground_mode: bool = False
120
119
  """
121
120
  Whether to resume the video when application enters foreground mode.
122
- Has effect only if [`pause_upon_entering_background_mode`][..] is also set to
121
+ Has effect only if [`pause_upon_entering_background_mode`][(c).] is also set to
123
122
  `True`.
124
123
  """
125
124
 
@@ -177,9 +176,10 @@ class Video(ft.LayoutControl):
177
176
 
178
177
  def before_update(self):
179
178
  super().before_update()
180
- assert 0 <= self.volume <= 100, (
181
- f"volume must be between 0 and 100 inclusive, got {self.volume}"
182
- )
179
+ if not (0 <= self.volume <= 100):
180
+ raise ValueError(
181
+ f"volume must be between 0 and 100 inclusive, got {self.volume}"
182
+ )
183
183
 
184
184
  async def play(self):
185
185
  """Starts playing the video."""
@@ -201,17 +201,17 @@ class Video(ft.LayoutControl):
201
201
  await self._invoke_method("stop")
202
202
 
203
203
  async def next(self):
204
- """Jumps to the next `VideoMedia` in the [`playlist`][..]."""
204
+ """Jumps to the next `VideoMedia` in the [`playlist`][(c).]."""
205
205
  await self._invoke_method("next")
206
206
 
207
207
  async def previous(self):
208
- """Jumps to the previous `VideoMedia` in the [`playlist`][..]."""
208
+ """Jumps to the previous `VideoMedia` in the [`playlist`][(c).]."""
209
209
  await self._invoke_method("previous")
210
210
 
211
211
  async def seek(self, position: ft.DurationValue):
212
212
  """
213
213
  Seeks the currently playing `VideoMedia` from the
214
- [`playlist`][..] at the specified `position`.
214
+ [`playlist`][(c).] at the specified `position`.
215
215
  """
216
216
  await self._invoke_method(
217
217
  "seek",
@@ -221,9 +221,10 @@ class Video(ft.LayoutControl):
221
221
  async def jump_to(self, media_index: int):
222
222
  """
223
223
  Jumps to the `VideoMedia` at the specified `media_index`
224
- in the [`playlist`][..].
224
+ in the [`playlist`][(c).].
225
225
  """
226
- assert self.playlist[media_index], "media_index is out of range"
226
+ if not (-len(self.playlist) <= media_index < len(self.playlist)):
227
+ raise IndexError("media_index is out of range")
227
228
  if media_index < 0:
228
229
  # dart doesn't support negative indexes
229
230
  media_index = len(self.playlist) + media_index
@@ -234,7 +235,8 @@ class Video(ft.LayoutControl):
234
235
 
235
236
  async def playlist_add(self, media: VideoMedia):
236
237
  """Appends/Adds the provided `media` to the `playlist`."""
237
- assert media.resource, "media has no resource"
238
+ if not media.resource:
239
+ raise ValueError("media has no resource")
238
240
  await self._invoke_method(
239
241
  method_name="playlist_add",
240
242
  arguments={"media": media},
@@ -243,7 +245,11 @@ class Video(ft.LayoutControl):
243
245
 
244
246
  async def playlist_remove(self, media_index: int):
245
247
  """Removes the provided `media` from the `playlist`."""
246
- assert self.playlist[media_index], "index out of range"
248
+ playlist_length = len(self.playlist)
249
+ if not (-playlist_length <= media_index < playlist_length):
250
+ raise IndexError("media_index is out of range")
251
+ if media_index < 0:
252
+ media_index = playlist_length + media_index
247
253
  await self._invoke_method(
248
254
  method_name="playlist_remove",
249
255
  arguments={"media_index": media_index},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-video
3
- Version: 0.70.0.dev6365
3
+ Version: 0.70.0.dev6370
4
4
  Summary: Cross-platform video playback for Flet apps.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -11,7 +11,7 @@ Project-URL: Issues, https://github.com/flet-dev/flet/issues
11
11
  Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
- Requires-Dist: flet==0.70.0.dev6365
14
+ Requires-Dist: flet==0.70.0.dev6370
15
15
  Dynamic: license-file
16
16
 
17
17
  # flet-video
@@ -0,0 +1 @@
1
+ flet==0.70.0.dev6370
@@ -1 +0,0 @@
1
- flet==0.70.0.dev6365