flet-video 0.86.0.dev2__tar.gz → 0.86.2__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.
- {flet_video-0.86.0.dev2/src/flet_video.egg-info → flet_video-0.86.2}/PKG-INFO +2 -2
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/pyproject.toml +2 -2
- {flet_video-0.86.0.dev2 → flet_video-0.86.2/src/flet_video.egg-info}/PKG-INFO +2 -2
- flet_video-0.86.2/src/flet_video.egg-info/requires.txt +1 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/video.dart +42 -18
- flet_video-0.86.0.dev2/src/flet_video.egg-info/requires.txt +0 -1
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/LICENSE +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/README.md +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/setup.cfg +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video/__init__.py +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video/types.py +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video/video.py +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video.egg-info/SOURCES.txt +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video.egg-info/dependency_links.txt +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flet_video.egg-info/top_level.txt +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/flet_video.dart +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/extension.dart +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/utils/file_utils_io.dart +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/utils/file_utils_web.dart +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/utils/video.dart +0 -0
- {flet_video-0.86.0.dev2 → flet_video-0.86.2}/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.86.
|
|
3
|
+
Version: 0.86.2
|
|
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.86.
|
|
14
|
+
Requires-Dist: flet==0.86.2
|
|
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.86.
|
|
3
|
+
version = "0.86.2"
|
|
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.86.
|
|
10
|
+
"flet==0.86.2",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
[project.urls]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flet-video
|
|
3
|
-
Version: 0.86.
|
|
3
|
+
Version: 0.86.2
|
|
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.86.
|
|
14
|
+
Requires-Dist: flet==0.86.2
|
|
15
15
|
Dynamic: license-file
|
|
16
16
|
|
|
17
17
|
# flet-video
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
flet==0.86.2
|
|
@@ -29,6 +29,24 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
29
29
|
bool _initialized = false;
|
|
30
30
|
Future<void>? _openFuture;
|
|
31
31
|
|
|
32
|
+
/// Last values applied to the current [_player]. They share the player's
|
|
33
|
+
/// lifetime (both are (re)created in [_setup]), so [build] diffs against them
|
|
34
|
+
/// to avoid re-applying unchanged properties.
|
|
35
|
+
///
|
|
36
|
+
/// [_setup] resets them to `null` whenever it creates a new player so [build]
|
|
37
|
+
/// re-applies every property to it. This is required on the `didUpdateWidget`
|
|
38
|
+
/// control-swap path, where the same State instance is reused with a fresh
|
|
39
|
+
/// player; on the `visible` off/on path the whole State (and these fields) is
|
|
40
|
+
/// recreated anyway, so they already start as `null`.
|
|
41
|
+
///
|
|
42
|
+
/// Keep this list in lockstep with the property diffs in [build].
|
|
43
|
+
double? _volume;
|
|
44
|
+
double? _pitch;
|
|
45
|
+
double? _playbackRate;
|
|
46
|
+
bool? _shufflePlaylist;
|
|
47
|
+
PlaylistMode? _playlistMode;
|
|
48
|
+
SubtitleTrack? _subtitleTrack;
|
|
49
|
+
|
|
32
50
|
/// Snapshot of the last-known playlist, used to diff against incoming
|
|
33
51
|
/// updates so single add/remove changes can be applied without a full reload.
|
|
34
52
|
dynamic _playlist;
|
|
@@ -152,6 +170,15 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
152
170
|
|
|
153
171
|
_player = Player(configuration: playerConfig);
|
|
154
172
|
|
|
173
|
+
// The new player starts with default settings, so forget what was applied
|
|
174
|
+
// to the previous one and let build() re-apply everything.
|
|
175
|
+
_volume = null;
|
|
176
|
+
_pitch = null;
|
|
177
|
+
_playbackRate = null;
|
|
178
|
+
_shufflePlaylist = null;
|
|
179
|
+
_playlistMode = null;
|
|
180
|
+
_subtitleTrack = null;
|
|
181
|
+
|
|
155
182
|
final videoControllerConfiguration = parseControllerConfiguration(
|
|
156
183
|
control.get("configuration"), const VideoControllerConfiguration())!;
|
|
157
184
|
_controller =
|
|
@@ -344,14 +371,15 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
344
371
|
parsePlaylistMode(widget.control.getString("playlist_mode"));
|
|
345
372
|
var fullscreen = widget.control.getBool("fullscreen", false)!;
|
|
346
373
|
|
|
347
|
-
// previous values
|
|
348
|
-
final prevVolume =
|
|
349
|
-
final prevPitch =
|
|
350
|
-
final prevPlaybackRate =
|
|
351
|
-
final prevShufflePlaylist =
|
|
352
|
-
final PlaylistMode? prevPlaylistMode =
|
|
353
|
-
final SubtitleTrack? prevSubtitleTrack =
|
|
354
|
-
|
|
374
|
+
// previous values (tracked per-player; see field docs)
|
|
375
|
+
final prevVolume = _volume;
|
|
376
|
+
final prevPitch = _pitch;
|
|
377
|
+
final prevPlaybackRate = _playbackRate;
|
|
378
|
+
final prevShufflePlaylist = _shufflePlaylist;
|
|
379
|
+
final PlaylistMode? prevPlaylistMode = _playlistMode;
|
|
380
|
+
final SubtitleTrack? prevSubtitleTrack = _subtitleTrack;
|
|
381
|
+
// Fullscreen is Video-widget UI state (not a player property), so it stays
|
|
382
|
+
// on the control model and is intentionally not reset with the player.
|
|
355
383
|
final prevFullscreen = widget.control.getBool("_fullscreen", false)!;
|
|
356
384
|
|
|
357
385
|
Video video = Video(
|
|
@@ -382,20 +410,19 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
382
410
|
volume != prevVolume &&
|
|
383
411
|
volume >= 0 &&
|
|
384
412
|
volume <= 100) {
|
|
385
|
-
|
|
413
|
+
_volume = volume;
|
|
386
414
|
await _player.setVolume(volume);
|
|
387
415
|
}
|
|
388
416
|
|
|
389
417
|
// pitch
|
|
390
418
|
if (pitch != null && pitch != prevPitch) {
|
|
391
|
-
|
|
419
|
+
_pitch = pitch;
|
|
392
420
|
await _player.setPitch(pitch);
|
|
393
421
|
}
|
|
394
422
|
|
|
395
423
|
// playbackRate
|
|
396
424
|
if (playbackRate != null && playbackRate != prevPlaybackRate) {
|
|
397
|
-
|
|
398
|
-
.updateProperties({"_playback_rate": playbackRate}, python: false);
|
|
425
|
+
_playbackRate = playbackRate;
|
|
399
426
|
await _player.setRate(playbackRate);
|
|
400
427
|
}
|
|
401
428
|
|
|
@@ -406,15 +433,13 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
406
433
|
|
|
407
434
|
// shufflePlaylist
|
|
408
435
|
if (shufflePlaylist != null && shufflePlaylist != prevShufflePlaylist) {
|
|
409
|
-
|
|
410
|
-
python: false);
|
|
436
|
+
_shufflePlaylist = shufflePlaylist;
|
|
411
437
|
await _player.setShuffle(shufflePlaylist);
|
|
412
438
|
}
|
|
413
439
|
|
|
414
440
|
// playlistMode
|
|
415
441
|
if (playlistMode != null && playlistMode != prevPlaylistMode) {
|
|
416
|
-
|
|
417
|
-
.updateProperties({"_playlist_mode": playlistMode}, python: false);
|
|
442
|
+
_playlistMode = playlistMode;
|
|
418
443
|
await _player.setPlaylistMode(playlistMode);
|
|
419
444
|
}
|
|
420
445
|
|
|
@@ -422,8 +447,7 @@ class _VideoControlState extends State<VideoControl> with FletStoreMixin {
|
|
|
422
447
|
if (subtitleTrack != null && subtitleTrack != prevSubtitleTrack) {
|
|
423
448
|
await _openFuture;
|
|
424
449
|
if (!_initialized) return;
|
|
425
|
-
|
|
426
|
-
python: false);
|
|
450
|
+
_subtitleTrack = subtitleTrack;
|
|
427
451
|
await _player.setSubtitleTrack(subtitleTrack);
|
|
428
452
|
}
|
|
429
453
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
flet==0.86.0.dev2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/utils/file_utils_io.dart
RENAMED
|
File without changes
|
|
File without changes
|
{flet_video-0.86.0.dev2 → flet_video-0.86.2}/src/flutter/flet_video/lib/src/utils/video.dart
RENAMED
|
File without changes
|
|
File without changes
|