flet-audio 0.2.0.dev42__py3-none-any.whl → 0.2.0.dev58__py3-none-any.whl
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-audio might be problematic. Click here for more details.
- flet_audio/__init__.py +10 -0
- flet_audio/audio.py +93 -54
- flet_audio/types.py +35 -10
- {flet_audio-0.2.0.dev42.dist-info → flet_audio-0.2.0.dev58.dist-info}/METADATA +1 -1
- flet_audio-0.2.0.dev58.dist-info/RECORD +18 -0
- flutter/flet_audio/lib/src/audio.dart +4 -7
- flutter/flet_audio/pubspec.lock +7 -7
- flutter/flet_audio/pubspec.yaml +1 -1
- flet_audio-0.2.0.dev42.dist-info/RECORD +0 -18
- {flet_audio-0.2.0.dev42.dist-info → flet_audio-0.2.0.dev58.dist-info}/WHEEL +0 -0
- {flet_audio-0.2.0.dev42.dist-info → flet_audio-0.2.0.dev58.dist-info}/licenses/LICENSE +0 -0
- {flet_audio-0.2.0.dev42.dist-info → flet_audio-0.2.0.dev58.dist-info}/top_level.txt +0 -0
flet_audio/__init__.py
CHANGED
|
@@ -4,4 +4,14 @@ from .types import (
|
|
|
4
4
|
AudioPositionChangeEvent,
|
|
5
5
|
AudioState,
|
|
6
6
|
AudioStateChangeEvent,
|
|
7
|
+
ReleaseMode,
|
|
7
8
|
)
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"Audio",
|
|
12
|
+
"AudioDurationChangeEvent",
|
|
13
|
+
"AudioPositionChangeEvent",
|
|
14
|
+
"AudioState",
|
|
15
|
+
"AudioStateChangeEvent",
|
|
16
|
+
"ReleaseMode",
|
|
17
|
+
]
|
flet_audio/audio.py
CHANGED
|
@@ -20,104 +20,103 @@ class Audio(ft.Service):
|
|
|
20
20
|
AssertionError: If both [`src`][(c).] and [`src_base64`][(c).] are `None`.
|
|
21
21
|
|
|
22
22
|
Note:
|
|
23
|
-
This control is non-visual and should be added to
|
|
23
|
+
This control is non-visual and should be added to
|
|
24
|
+
[`Page.services`][flet.Page.services]
|
|
25
|
+
list before it can be used.
|
|
24
26
|
"""
|
|
25
27
|
|
|
26
28
|
src: Optional[str] = None
|
|
27
29
|
"""
|
|
28
|
-
The audio source.
|
|
30
|
+
The audio source.
|
|
31
|
+
Can be a URL or a local [asset file](https://docs.flet.dev/cookbook/assets).
|
|
29
32
|
|
|
30
33
|
Note:
|
|
31
|
-
- At least one of `src` or [`src_base64`][
|
|
32
|
-
with `src_base64` having priority if both are provided.
|
|
33
|
-
- [Here](https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#supported-formats--encodings)
|
|
34
|
+
- At least one of `src` or [`src_base64`][flet_audio.Audio.src_base64] must be
|
|
35
|
+
provided, with `src_base64` having priority if both are provided.
|
|
36
|
+
- [Here](https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#supported-formats--encodings)
|
|
34
37
|
is a list of supported audio formats.
|
|
35
38
|
"""
|
|
36
39
|
|
|
37
40
|
src_base64: Optional[str] = None
|
|
38
41
|
"""
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
Defines the contents of audio file encoded in base-64 format.
|
|
43
|
+
|
|
41
44
|
Note:
|
|
42
|
-
- At least one of [`src`][
|
|
45
|
+
- At least one of [`src`][flet_audio.Audio.src] or `src_base64` must be provided,
|
|
43
46
|
with `src_base64` having priority if both are provided.
|
|
44
|
-
- [Here](https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#supported-formats--encodings)
|
|
47
|
+
- [Here](https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#supported-formats--encodings)
|
|
45
48
|
is a list of supported audio formats.
|
|
46
49
|
"""
|
|
47
50
|
|
|
48
51
|
autoplay: bool = False
|
|
49
52
|
"""
|
|
50
53
|
Starts playing audio as soon as audio control is added to a page.
|
|
51
|
-
|
|
54
|
+
|
|
52
55
|
Note:
|
|
53
|
-
Autoplay works in desktop, mobile apps and Safari browser,
|
|
56
|
+
Autoplay works in desktop, mobile apps and Safari browser,
|
|
57
|
+
but doesn't work in Chrome/Edge.
|
|
54
58
|
"""
|
|
55
59
|
|
|
56
60
|
volume: ft.Number = 1.0
|
|
57
61
|
"""
|
|
58
62
|
Sets the volume (amplitude).
|
|
59
|
-
It's value ranges between `0.0` (mute) and `1.0` (maximum volume).
|
|
63
|
+
It's value ranges between `0.0` (mute) and `1.0` (maximum volume).
|
|
60
64
|
Intermediate values are linearly interpolated.
|
|
61
65
|
"""
|
|
62
66
|
|
|
63
67
|
balance: ft.Number = 0.0
|
|
64
68
|
"""
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
Defines the stereo balance.
|
|
67
70
|
|
|
68
|
-
* `-1` - The left channel is at full volume; the right channel is silent.
|
|
69
|
-
* `1` - The right channel is at full volume; the left channel is silent.
|
|
71
|
+
* `-1` - The left channel is at full volume; the right channel is silent.
|
|
72
|
+
* `1` - The right channel is at full volume; the left channel is silent.
|
|
70
73
|
* `0` - Both channels are at the same volume.
|
|
71
74
|
"""
|
|
72
75
|
|
|
73
76
|
playback_rate: ft.Number = 1.0
|
|
74
77
|
"""
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
Defines the playback rate.
|
|
79
|
+
|
|
77
80
|
Should ideally be set when creating the constructor.
|
|
78
|
-
|
|
79
|
-
Note:
|
|
80
|
-
- iOS and macOS have limits between `0.5x` and `2x`.
|
|
81
|
+
|
|
82
|
+
Note:
|
|
83
|
+
- iOS and macOS have limits between `0.5x` and `2x`.
|
|
81
84
|
- Android SDK version should be 23 or higher.
|
|
82
85
|
"""
|
|
83
86
|
|
|
84
87
|
release_mode: ReleaseMode = ReleaseMode.RELEASE
|
|
85
88
|
"""
|
|
86
|
-
|
|
89
|
+
Defines the release mode.
|
|
87
90
|
"""
|
|
88
91
|
|
|
89
|
-
on_loaded: ft.
|
|
92
|
+
on_loaded: Optional[ft.ControlEventHandler["Audio"]] = None
|
|
90
93
|
"""
|
|
91
94
|
Fires when an audio is loaded/buffered.
|
|
92
95
|
"""
|
|
93
96
|
|
|
94
|
-
on_duration_change: ft.
|
|
97
|
+
on_duration_change: Optional[ft.EventHandler[AudioDurationChangeEvent]] = None
|
|
95
98
|
"""
|
|
96
|
-
Fires as soon as audio duration is available
|
|
97
|
-
|
|
98
|
-
Event handler argument is of type [`AudioDurationChangeEvent`][(p).].
|
|
99
|
+
Fires as soon as audio duration is available
|
|
100
|
+
(it might take a while to download or buffer it).
|
|
99
101
|
"""
|
|
100
102
|
|
|
101
|
-
on_state_change: ft.
|
|
103
|
+
on_state_change: Optional[ft.EventHandler[AudioStateChangeEvent]] = None
|
|
102
104
|
"""
|
|
103
|
-
Fires when audio player state changes.
|
|
104
|
-
|
|
105
|
-
Event handler argument is of type [`AudioStateChangeEvent`][(p).].
|
|
105
|
+
Fires when audio player state changes.
|
|
106
106
|
"""
|
|
107
107
|
|
|
108
|
-
on_position_change: ft.
|
|
108
|
+
on_position_change: Optional[ft.EventHandler[AudioPositionChangeEvent]] = None
|
|
109
109
|
"""
|
|
110
|
-
Fires when audio position is changed.
|
|
111
|
-
Will continuously update the position of the playback
|
|
112
|
-
|
|
113
|
-
Can be used for a progress bar.
|
|
110
|
+
Fires when audio position is changed.
|
|
111
|
+
Will continuously update the position of the playback
|
|
112
|
+
every 1 second if the status is playing.
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
Can be used for a progress bar.
|
|
116
115
|
"""
|
|
117
116
|
|
|
118
|
-
on_seek_complete: ft.
|
|
117
|
+
on_seek_complete: Optional[ft.ControlEventHandler["Audio"]] = None
|
|
119
118
|
"""
|
|
120
|
-
Fires on seek completions.
|
|
119
|
+
Fires on seek completions.
|
|
121
120
|
An event is going to be sent as soon as the audio seek is finished.
|
|
122
121
|
"""
|
|
123
122
|
|
|
@@ -125,25 +124,35 @@ class Audio(ft.Service):
|
|
|
125
124
|
super().before_update()
|
|
126
125
|
assert self.src or self.src_base64, "either src or src_base64 must be provided"
|
|
127
126
|
|
|
128
|
-
async def play_async(
|
|
127
|
+
async def play_async(
|
|
128
|
+
self, position: ft.DurationValue = ft.Duration(), timeout: Optional[float] = 10
|
|
129
|
+
):
|
|
129
130
|
"""
|
|
130
131
|
Starts playing audio from the specified `position`.
|
|
131
132
|
|
|
132
133
|
Args:
|
|
133
134
|
position: The position to start playback from.
|
|
134
135
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
136
|
+
|
|
135
137
|
Raises:
|
|
136
138
|
TimeoutError: If the request times out.
|
|
137
139
|
"""
|
|
138
|
-
await self._invoke_method_async(
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
await self._invoke_method_async(
|
|
141
|
+
method_name="play",
|
|
142
|
+
arguments={"position": position},
|
|
143
|
+
timeout=timeout,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
def play(
|
|
147
|
+
self, position: ft.DurationValue = ft.Duration(), timeout: Optional[float] = 10
|
|
148
|
+
):
|
|
141
149
|
"""
|
|
142
150
|
Starts playing audio from the specified `position`.
|
|
143
151
|
|
|
144
152
|
Args:
|
|
145
153
|
position: The position to start playback from.
|
|
146
154
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
155
|
+
|
|
147
156
|
Raises:
|
|
148
157
|
TimeoutError: If the request times out.
|
|
149
158
|
"""
|
|
@@ -153,7 +162,8 @@ class Audio(ft.Service):
|
|
|
153
162
|
"""
|
|
154
163
|
Pauses the audio that is currently playing.
|
|
155
164
|
|
|
156
|
-
If you call [`resume()`][.resume] or
|
|
165
|
+
If you call [`resume()`][flet_audio.Audio.resume] or
|
|
166
|
+
[`resume_async()`][flet_audio.Audio.resume_async] later,
|
|
157
167
|
the audio will resume from the point that it has been paused.
|
|
158
168
|
"""
|
|
159
169
|
await self._invoke_method_async("pause", timeout=timeout)
|
|
@@ -162,11 +172,13 @@ class Audio(ft.Service):
|
|
|
162
172
|
"""
|
|
163
173
|
Pauses the audio that is currently playing.
|
|
164
174
|
|
|
165
|
-
If you call [`resume()`][.resume] or
|
|
175
|
+
If you call [`resume()`][flet_audio.Audio.resume] or
|
|
176
|
+
[`resume_async()`][flet_audio.Audio.resume_async] later,
|
|
166
177
|
the audio will resume from the point that it has been paused.
|
|
167
178
|
|
|
168
179
|
Args:
|
|
169
180
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
181
|
+
|
|
170
182
|
Raises:
|
|
171
183
|
TimeoutError: If the request times out.
|
|
172
184
|
"""
|
|
@@ -178,6 +190,7 @@ class Audio(ft.Service):
|
|
|
178
190
|
|
|
179
191
|
Args:
|
|
180
192
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
193
|
+
|
|
181
194
|
Raises:
|
|
182
195
|
TimeoutError: If the request times out.
|
|
183
196
|
"""
|
|
@@ -189,6 +202,7 @@ class Audio(ft.Service):
|
|
|
189
202
|
|
|
190
203
|
Args:
|
|
191
204
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
205
|
+
|
|
192
206
|
Raises:
|
|
193
207
|
TimeoutError: If the request times out.
|
|
194
208
|
"""
|
|
@@ -198,10 +212,12 @@ class Audio(ft.Service):
|
|
|
198
212
|
"""
|
|
199
213
|
Releases the resources associated with this media player.
|
|
200
214
|
These are going to be fetched or buffered again as soon as
|
|
201
|
-
you change the source or call [`resume()`][.resume] or
|
|
215
|
+
you change the source or call [`resume()`][flet_audio.Audio.resume] or
|
|
216
|
+
[`resume_async()`][flet_audio.Audio.resume_async].
|
|
202
217
|
|
|
203
218
|
Args:
|
|
204
219
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
220
|
+
|
|
205
221
|
Raises:
|
|
206
222
|
TimeoutError: If the request times out.
|
|
207
223
|
"""
|
|
@@ -211,26 +227,35 @@ class Audio(ft.Service):
|
|
|
211
227
|
"""
|
|
212
228
|
Releases the resources associated with this media player.
|
|
213
229
|
These are going to be fetched or buffered again as soon as
|
|
214
|
-
you change the source or call [`resume()`][.resume] or
|
|
230
|
+
you change the source or call [`resume()`][flet_audio.Audio.resume] or
|
|
231
|
+
[`resume_async()`][flet_audio.Audio.resume_async].
|
|
215
232
|
|
|
216
233
|
Args:
|
|
217
234
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
235
|
+
|
|
218
236
|
Raises:
|
|
219
237
|
TimeoutError: If the request times out.
|
|
220
238
|
"""
|
|
221
239
|
asyncio.create_task(self.release_async(timeout=timeout))
|
|
222
240
|
|
|
223
|
-
async def seek_async(
|
|
241
|
+
async def seek_async(
|
|
242
|
+
self, position: ft.DurationValue, timeout: Optional[float] = 10
|
|
243
|
+
):
|
|
224
244
|
"""
|
|
225
245
|
Moves the cursor to the desired position.
|
|
226
246
|
|
|
227
247
|
Args:
|
|
228
248
|
position: The position to seek/move to.
|
|
229
249
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
250
|
+
|
|
230
251
|
Raises:
|
|
231
252
|
TimeoutError: If the request times out.
|
|
232
253
|
"""
|
|
233
|
-
await self._invoke_method_async(
|
|
254
|
+
await self._invoke_method_async(
|
|
255
|
+
method_name="seek",
|
|
256
|
+
arguments={"position": position},
|
|
257
|
+
timeout=timeout,
|
|
258
|
+
)
|
|
234
259
|
|
|
235
260
|
def seek(self, position: ft.DurationValue, timeout: Optional[float] = 10):
|
|
236
261
|
"""
|
|
@@ -239,12 +264,15 @@ class Audio(ft.Service):
|
|
|
239
264
|
Args:
|
|
240
265
|
position: The position to seek/move to.
|
|
241
266
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
267
|
+
|
|
242
268
|
Raises:
|
|
243
269
|
TimeoutError: If the request times out.
|
|
244
270
|
"""
|
|
245
271
|
asyncio.create_task(self.seek_async(position, timeout=timeout))
|
|
246
272
|
|
|
247
|
-
async def get_duration_async(
|
|
273
|
+
async def get_duration_async(
|
|
274
|
+
self, timeout: Optional[float] = 10
|
|
275
|
+
) -> Optional[ft.Duration]:
|
|
248
276
|
"""
|
|
249
277
|
Get audio duration of the audio playback.
|
|
250
278
|
|
|
@@ -253,20 +281,31 @@ class Audio(ft.Service):
|
|
|
253
281
|
|
|
254
282
|
Args:
|
|
255
283
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
284
|
+
|
|
256
285
|
Returns:
|
|
257
286
|
The duration of audio playback.
|
|
287
|
+
|
|
258
288
|
Raises:
|
|
259
289
|
TimeoutError: If the request times out.
|
|
260
290
|
"""
|
|
261
|
-
return await self._invoke_method_async(
|
|
262
|
-
|
|
263
|
-
|
|
291
|
+
return await self._invoke_method_async(
|
|
292
|
+
method_name="get_duration",
|
|
293
|
+
timeout=timeout,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
async def get_current_position_async(
|
|
297
|
+
self, timeout: Optional[float] = 10
|
|
298
|
+
) -> Optional[ft.Duration]:
|
|
264
299
|
"""
|
|
265
300
|
Get the current position of the audio playback.
|
|
266
301
|
|
|
267
302
|
Args:
|
|
268
303
|
timeout: The maximum amount of time (in seconds) to wait for a response.
|
|
304
|
+
|
|
269
305
|
Returns:
|
|
270
306
|
The current position of the audio playback.
|
|
271
307
|
"""
|
|
272
|
-
return await self._invoke_method_async(
|
|
308
|
+
return await self._invoke_method_async(
|
|
309
|
+
method_name="get_current_position",
|
|
310
|
+
timeout=timeout,
|
|
311
|
+
)
|
flet_audio/types.py
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
1
2
|
from enum import Enum
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
2
4
|
|
|
3
5
|
import flet as ft
|
|
4
6
|
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .audio import Audio # noqa
|
|
9
|
+
|
|
5
10
|
__all__ = [
|
|
11
|
+
"AudioDurationChangeEvent",
|
|
12
|
+
"AudioPositionChangeEvent",
|
|
6
13
|
"AudioState",
|
|
7
14
|
"AudioStateChangeEvent",
|
|
8
|
-
"AudioPositionChangeEvent",
|
|
9
|
-
"AudioDurationChangeEvent",
|
|
10
15
|
"ReleaseMode",
|
|
11
16
|
]
|
|
12
17
|
|
|
@@ -19,10 +24,11 @@ class ReleaseMode(Enum):
|
|
|
19
24
|
Releases all resources, just like calling release method.
|
|
20
25
|
|
|
21
26
|
Info:
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
27
|
+
- On Android, the media player is quite resource-intensive, and this will
|
|
28
|
+
let it go. Data will be buffered again when needed (if it's a remote file,
|
|
29
|
+
it will be downloaded again).
|
|
30
|
+
- On iOS and macOS, works just like [`Audio.release()`][flet_audio.Audio.release]
|
|
31
|
+
method.
|
|
26
32
|
"""
|
|
27
33
|
|
|
28
34
|
LOOP = "loop"
|
|
@@ -41,6 +47,7 @@ class ReleaseMode(Enum):
|
|
|
41
47
|
|
|
42
48
|
class AudioState(Enum):
|
|
43
49
|
"""The state of the audio player."""
|
|
50
|
+
|
|
44
51
|
STOPPED = "stopped"
|
|
45
52
|
"""The audio player is stopped."""
|
|
46
53
|
|
|
@@ -57,13 +64,31 @@ class AudioState(Enum):
|
|
|
57
64
|
"""The audio player has been disposed of and should not be used anymore."""
|
|
58
65
|
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
@dataclass
|
|
68
|
+
class AudioStateChangeEvent(ft.Event["Audio"]):
|
|
69
|
+
"""
|
|
70
|
+
Event triggered when the audio playback state changes.
|
|
71
|
+
"""
|
|
72
|
+
|
|
61
73
|
state: AudioState
|
|
74
|
+
"""The current state of the audio player."""
|
|
75
|
+
|
|
62
76
|
|
|
77
|
+
@dataclass
|
|
78
|
+
class AudioPositionChangeEvent(ft.Event["Audio"]):
|
|
79
|
+
"""
|
|
80
|
+
Event triggered when the audio playback position changes.
|
|
81
|
+
"""
|
|
63
82
|
|
|
64
|
-
class AudioPositionChangeEvent(ft.Event[ft.EventControlType]):
|
|
65
83
|
position: int
|
|
84
|
+
"""The current playback position in milliseconds."""
|
|
66
85
|
|
|
67
86
|
|
|
68
|
-
|
|
69
|
-
|
|
87
|
+
@dataclass
|
|
88
|
+
class AudioDurationChangeEvent(ft.Event["Audio"]):
|
|
89
|
+
"""
|
|
90
|
+
Event triggered when the audio duration changes.
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
duration: ft.Duration
|
|
94
|
+
"""The duration of the audio."""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
flet_audio/__init__.py,sha256=6uWGMdSCJYudjp3naJzcbM89EcupsJ2De2J9rmDV0ME,326
|
|
2
|
+
flet_audio/audio.py,sha256=a_APLvecPmJMtAsiMIcfX8Ctoo8r3A1OPVZjZ8KpB0A,9885
|
|
3
|
+
flet_audio/types.py,sha256=ZxjM1LSKQospbvv9qrcwnpmka0tFtva_4M38prn9GdI,2330
|
|
4
|
+
flet_audio-0.2.0.dev58.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
+
flutter/flet_audio/CHANGELOG.md,sha256=66sWepPaeTc9_lzcYIGU55AlxSU5Z1XVtknXpzd_-p8,40
|
|
6
|
+
flutter/flet_audio/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
7
|
+
flutter/flet_audio/README.md,sha256=BEITqZ4okarTGCquI4ii6tdffGm2qyxMkMZbsedCwLQ,60
|
|
8
|
+
flutter/flet_audio/analysis_options.yaml,sha256=32kjGAc-zF87inWaH5M46yGZWQDTwrwfvNLHeAocfG4,154
|
|
9
|
+
flutter/flet_audio/pubspec.lock,sha256=BxIAyK5slzN4RTADs8Byq6oa5UkSTu6Bijzse0WRh08,25471
|
|
10
|
+
flutter/flet_audio/pubspec.yaml,sha256=AzhTbc7Ccloq9APOXFIgTgkPSivh_g1ONnzKpv-zf3M,510
|
|
11
|
+
flutter/flet_audio/lib/flet_audio.dart,sha256=JsHEW9Gic_011jhKpnn278pi1kiWjp9gUjfNF5rWmXs,65
|
|
12
|
+
flutter/flet_audio/lib/src/audio.dart,sha256=ExGoAU9pIlR5z6ptVDXRMhD5NktkBljN9OgRy5InfIw,5108
|
|
13
|
+
flutter/flet_audio/lib/src/extension.dart,sha256=okI-bxwSUB9FwgJ7TmiiHcE5yi5z66Yp1ri--V1wVnw,299
|
|
14
|
+
flutter/flet_audio/lib/src/utils/audio.dart,sha256=Rpbf7xJkNB3xtwrfmXru1t2k3_TgPEnh3Ws6i_2J0EQ,346
|
|
15
|
+
flet_audio-0.2.0.dev58.dist-info/METADATA,sha256=4K69ubpkH1-Us0OT6aKbstliBPfFl2K3-hZQUalyCsU,1935
|
|
16
|
+
flet_audio-0.2.0.dev58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
flet_audio-0.2.0.dev58.dist-info/top_level.txt,sha256=hZbGOXppSiKRUWJf1ZRlBKMyfijq6Y-8DffGOh10Wq4,19
|
|
18
|
+
flet_audio-0.2.0.dev58.dist-info/RECORD,,
|
|
@@ -33,12 +33,12 @@ class AudioService extends FletService {
|
|
|
33
33
|
|
|
34
34
|
_onDurationChangedSubscription =
|
|
35
35
|
player.onDurationChanged.listen((duration) {
|
|
36
|
-
control.triggerEvent(
|
|
37
|
-
"duration_change", {"duration": duration.inMilliseconds});
|
|
36
|
+
control.triggerEvent("duration_change", {"duration": duration});
|
|
38
37
|
_duration = duration;
|
|
39
38
|
});
|
|
40
39
|
|
|
41
|
-
_onStateChangedSubscription =
|
|
40
|
+
_onStateChangedSubscription =
|
|
41
|
+
player.onPlayerStateChanged.listen((PlayerState state) {
|
|
42
42
|
control.triggerEvent("state_change", {"state": state.name});
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -116,10 +116,7 @@ class AudioService extends FletService {
|
|
|
116
116
|
await player.setPlaybackRate(playbackRate);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
if (!kIsWeb &&
|
|
120
|
-
balance != _balance &&
|
|
121
|
-
balance >= -1 &&
|
|
122
|
-
balance <= 1) {
|
|
119
|
+
if (!kIsWeb && balance != _balance && balance >= -1 && balance <= 1) {
|
|
123
120
|
_balance = balance;
|
|
124
121
|
await player.setBalance(balance);
|
|
125
122
|
}
|
flutter/flet_audio/pubspec.lock
CHANGED
|
@@ -190,7 +190,7 @@ packages:
|
|
|
190
190
|
description:
|
|
191
191
|
path: "packages/flet"
|
|
192
192
|
ref: main
|
|
193
|
-
resolved-ref:
|
|
193
|
+
resolved-ref: cf8823c5d766ea7866480986aa3ee871f4091e78
|
|
194
194
|
url: "https://github.com/flet-dev/flet.git"
|
|
195
195
|
source: git
|
|
196
196
|
version: "0.70.0"
|
|
@@ -211,10 +211,10 @@ packages:
|
|
|
211
211
|
dependency: "direct dev"
|
|
212
212
|
description:
|
|
213
213
|
name: flutter_lints
|
|
214
|
-
sha256:
|
|
214
|
+
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
|
|
215
215
|
url: "https://pub.dev"
|
|
216
216
|
source: hosted
|
|
217
|
-
version: "
|
|
217
|
+
version: "3.0.2"
|
|
218
218
|
flutter_localizations:
|
|
219
219
|
dependency: transitive
|
|
220
220
|
description: flutter
|
|
@@ -322,10 +322,10 @@ packages:
|
|
|
322
322
|
dependency: transitive
|
|
323
323
|
description:
|
|
324
324
|
name: lints
|
|
325
|
-
sha256:
|
|
325
|
+
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
|
326
326
|
url: "https://pub.dev"
|
|
327
327
|
source: hosted
|
|
328
|
-
version: "
|
|
328
|
+
version: "3.0.0"
|
|
329
329
|
logging:
|
|
330
330
|
dependency: transitive
|
|
331
331
|
description:
|
|
@@ -823,10 +823,10 @@ packages:
|
|
|
823
823
|
dependency: transitive
|
|
824
824
|
description:
|
|
825
825
|
name: window_manager
|
|
826
|
-
sha256: "
|
|
826
|
+
sha256: "7eb6d6c4164ec08e1bf978d6e733f3cebe792e2a23fb07cbca25c2872bfdbdcd"
|
|
827
827
|
url: "https://pub.dev"
|
|
828
828
|
source: hosted
|
|
829
|
-
version: "0.5.
|
|
829
|
+
version: "0.5.1"
|
|
830
830
|
window_to_front:
|
|
831
831
|
dependency: transitive
|
|
832
832
|
description:
|
flutter/flet_audio/pubspec.yaml
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
flet_audio/__init__.py,sha256=aLfmcJXT-xQPy6DAn-jQCh0fXRk5ji96Fg15PL5lo0E,151
|
|
2
|
-
flet_audio/audio.py,sha256=QFkZHVEV_TtxnHUh2AIg6ayY2xxfjgEiYlmy2wTYGo4,9572
|
|
3
|
-
flet_audio/types.py,sha256=WvpNbUxjtoGW9YUW3VM1DhhQ8UQbnfvr39MBwJeFNK4,1800
|
|
4
|
-
flet_audio-0.2.0.dev42.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
-
flutter/flet_audio/CHANGELOG.md,sha256=66sWepPaeTc9_lzcYIGU55AlxSU5Z1XVtknXpzd_-p8,40
|
|
6
|
-
flutter/flet_audio/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
7
|
-
flutter/flet_audio/README.md,sha256=BEITqZ4okarTGCquI4ii6tdffGm2qyxMkMZbsedCwLQ,60
|
|
8
|
-
flutter/flet_audio/analysis_options.yaml,sha256=32kjGAc-zF87inWaH5M46yGZWQDTwrwfvNLHeAocfG4,154
|
|
9
|
-
flutter/flet_audio/pubspec.lock,sha256=Rje88uBW7vkOXea40g_LPnX_P5pFO1r-3gE_5X3Mris,25471
|
|
10
|
-
flutter/flet_audio/pubspec.yaml,sha256=_lJ8tH_SgiuDKkYdpHOlzPYqNguX5mMlaEfZJbz_KFg,510
|
|
11
|
-
flutter/flet_audio/lib/flet_audio.dart,sha256=JsHEW9Gic_011jhKpnn278pi1kiWjp9gUjfNF5rWmXs,65
|
|
12
|
-
flutter/flet_audio/lib/src/audio.dart,sha256=4rHAZCcXeA6ZbFpSENlyc210y5GpVO_zmcfOkcYh-ic,5156
|
|
13
|
-
flutter/flet_audio/lib/src/extension.dart,sha256=okI-bxwSUB9FwgJ7TmiiHcE5yi5z66Yp1ri--V1wVnw,299
|
|
14
|
-
flutter/flet_audio/lib/src/utils/audio.dart,sha256=Rpbf7xJkNB3xtwrfmXru1t2k3_TgPEnh3Ws6i_2J0EQ,346
|
|
15
|
-
flet_audio-0.2.0.dev42.dist-info/METADATA,sha256=LLnFbuVGF75wyivQgiygO2t4dJN3A6gebBCEvrZnrwM,1935
|
|
16
|
-
flet_audio-0.2.0.dev42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
-
flet_audio-0.2.0.dev42.dist-info/top_level.txt,sha256=hZbGOXppSiKRUWJf1ZRlBKMyfijq6Y-8DffGOh10Wq4,19
|
|
18
|
-
flet_audio-0.2.0.dev42.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|