|
7 | 7 | library media_session_web;
|
8 | 8 |
|
9 | 9 | import 'dart:js_interop';
|
10 |
| -import 'package:web/web.dart' as web; |
11 | 10 |
|
12 | 11 | /// Media session playback state types.
|
13 | 12 | ///
|
@@ -54,41 +53,41 @@ typedef MediaSessionActionHandler = dynamic Function(MediaSessionActionDetails);
|
54 | 53 | @JS()
|
55 | 54 | @anonymous
|
56 | 55 | extension type MediaSessionActionDetails._(JSObject _) implements JSObject {
|
57 |
| -/// An action type string taken from the [MediaActions], indicating which |
58 |
| -/// type of action needs to be performed. |
59 |
| -external String get action; |
| 56 | + /// An action type string taken from the [MediaActions], indicating which |
| 57 | + /// type of action needs to be performed. |
| 58 | + external String get action; |
60 | 59 |
|
61 |
| -/// Indicates whether or not to perform a "fast" seek. |
62 |
| -/// |
63 |
| -/// A `seekto` action may optionally include this property. |
64 |
| -/// |
65 |
| -/// A "fast" seek is a seek being performed in a rapid sequence, such as when |
66 |
| -/// fast-forwarding or reversing through the media, rapidly skipping through it. |
67 |
| -/// |
68 |
| -/// This property can be used to indicate that you should use the shortest possible |
69 |
| -/// method to seek the media. This property is not included on the final action in |
70 |
| -/// the seek sequence in this situation. |
71 |
| -external bool get fastSeek; |
| 60 | + /// Indicates whether or not to perform a "fast" seek. |
| 61 | + /// |
| 62 | + /// A `seekto` action may optionally include this property. |
| 63 | + /// |
| 64 | + /// A "fast" seek is a seek being performed in a rapid sequence, such as when |
| 65 | + /// fast-forwarding or reversing through the media, rapidly skipping through it. |
| 66 | + /// |
| 67 | + /// This property can be used to indicate that you should use the shortest possible |
| 68 | + /// method to seek the media. This property is not included on the final action in |
| 69 | + /// the seek sequence in this situation. |
| 70 | + external bool? get fastSeek; |
72 | 71 |
|
73 |
| -/// If the action is either `seekforward` or `seekbackward` |
74 |
| -/// and this property is present, it is a floating point value which indicates |
75 |
| -/// the seek interval. |
76 |
| -/// |
77 |
| -/// If this property isn't present, those actions should choose a reasonable |
78 |
| -/// default interval. |
79 |
| -external double get seekOffset; |
| 72 | + /// If the action is either `seekforward` or `seekbackward` |
| 73 | + /// and this property is present, it is a floating point value which indicates |
| 74 | + /// the seek interval. |
| 75 | + /// |
| 76 | + /// If this property isn't present, those actions should choose a reasonable |
| 77 | + /// default interval. |
| 78 | + external double? get seekOffset; |
80 | 79 |
|
81 |
| -/// If the action is `seekto`, this property is present and |
82 |
| -/// indicates the absolute time within the media to move the playback position to. |
83 |
| -/// |
84 |
| -/// This property is not present for other action types. |
85 |
| -external double get seekTime; |
| 80 | + /// If the action is `seekto`, this property is present and |
| 81 | + /// indicates the absolute time within the media to move the playback position to. |
| 82 | + /// |
| 83 | + /// This property is not present for other action types. |
| 84 | + external double? get seekTime; |
86 | 85 |
|
87 |
| -/// Creates the details. |
88 |
| -external factory MediaSessionActionDetails({ |
89 |
| -String? action, |
90 |
| -bool? fastSeek, |
91 |
| -double? seekOffset, |
92 |
| -double? seekTime, |
93 |
| -}); |
| 86 | + /// Creates the details. |
| 87 | + external factory MediaSessionActionDetails({ |
| 88 | + String? action, |
| 89 | + bool? fastSeek, |
| 90 | + double? seekOffset, |
| 91 | + double? seekTime, |
| 92 | + }); |
94 | 93 | }
|
0 commit comments