QueueAppend item pigeon
This commit is contained in:
parent
370e0e6c8d
commit
1e8af8a46e
5 changed files with 249 additions and 9 deletions
|
|
@ -435,6 +435,60 @@ public class PlatformBridgeApis {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Generated class from Pigeon that represents data sent in messages. */
|
||||||
|
public static class MediaQueueItem {
|
||||||
|
private Long itemId;
|
||||||
|
public Long getItemId() { return itemId; }
|
||||||
|
public void setItemId(Long setterArg) { this.itemId = setterArg; }
|
||||||
|
|
||||||
|
private Double playbackDuration;
|
||||||
|
public Double getPlaybackDuration() { return playbackDuration; }
|
||||||
|
public void setPlaybackDuration(Double setterArg) { this.playbackDuration = setterArg; }
|
||||||
|
|
||||||
|
private Double startTime;
|
||||||
|
public Double getStartTime() { return startTime; }
|
||||||
|
public void setStartTime(Double setterArg) { this.startTime = setterArg; }
|
||||||
|
|
||||||
|
private MediaInfo media;
|
||||||
|
public MediaInfo getMedia() { return media; }
|
||||||
|
public void setMedia(MediaInfo setterArg) { this.media = setterArg; }
|
||||||
|
|
||||||
|
private Boolean autoplay;
|
||||||
|
public Boolean getAutoplay() { return autoplay; }
|
||||||
|
public void setAutoplay(Boolean setterArg) { this.autoplay = setterArg; }
|
||||||
|
|
||||||
|
private Double preloadTime;
|
||||||
|
public Double getPreloadTime() { return preloadTime; }
|
||||||
|
public void setPreloadTime(Double setterArg) { this.preloadTime = setterArg; }
|
||||||
|
|
||||||
|
Map<String, Object> toMap() {
|
||||||
|
Map<String, Object> toMapResult = new HashMap<>();
|
||||||
|
toMapResult.put("itemId", itemId);
|
||||||
|
toMapResult.put("playbackDuration", playbackDuration);
|
||||||
|
toMapResult.put("startTime", startTime);
|
||||||
|
toMapResult.put("media", (media == null) ? null : media.toMap());
|
||||||
|
toMapResult.put("autoplay", autoplay);
|
||||||
|
toMapResult.put("preloadTime", preloadTime);
|
||||||
|
return toMapResult;
|
||||||
|
}
|
||||||
|
static MediaQueueItem fromMap(Map<String, Object> map) {
|
||||||
|
MediaQueueItem fromMapResult = new MediaQueueItem();
|
||||||
|
Object itemId = map.get("itemId");
|
||||||
|
fromMapResult.itemId = (itemId == null) ? null : ((itemId instanceof Integer) ? (Integer)itemId : (Long)itemId);
|
||||||
|
Object playbackDuration = map.get("playbackDuration");
|
||||||
|
fromMapResult.playbackDuration = (Double)playbackDuration;
|
||||||
|
Object startTime = map.get("startTime");
|
||||||
|
fromMapResult.startTime = (Double)startTime;
|
||||||
|
Object media = map.get("media");
|
||||||
|
fromMapResult.media = MediaInfo.fromMap((Map)media);
|
||||||
|
Object autoplay = map.get("autoplay");
|
||||||
|
fromMapResult.autoplay = (Boolean)autoplay;
|
||||||
|
Object preloadTime = map.get("preloadTime");
|
||||||
|
fromMapResult.preloadTime = (Double)preloadTime;
|
||||||
|
return fromMapResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Generated class from Pigeon that represents data sent in messages. */
|
/** Generated class from Pigeon that represents data sent in messages. */
|
||||||
public static class CastDevice {
|
public static class CastDevice {
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
|
|
@ -518,9 +572,12 @@ public class PlatformBridgeApis {
|
||||||
return MediaMetadata.fromMap((Map<String, Object>) readValue(buffer));
|
return MediaMetadata.fromMap((Map<String, Object>) readValue(buffer));
|
||||||
|
|
||||||
case (byte)134:
|
case (byte)134:
|
||||||
return MediaTrack.fromMap((Map<String, Object>) readValue(buffer));
|
return MediaQueueItem.fromMap((Map<String, Object>) readValue(buffer));
|
||||||
|
|
||||||
case (byte)135:
|
case (byte)135:
|
||||||
|
return MediaTrack.fromMap((Map<String, Object>) readValue(buffer));
|
||||||
|
|
||||||
|
case (byte)136:
|
||||||
return WebImage.fromMap((Map<String, Object>) readValue(buffer));
|
return WebImage.fromMap((Map<String, Object>) readValue(buffer));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -554,12 +611,16 @@ public class PlatformBridgeApis {
|
||||||
stream.write(133);
|
stream.write(133);
|
||||||
writeValue(stream, ((MediaMetadata) value).toMap());
|
writeValue(stream, ((MediaMetadata) value).toMap());
|
||||||
} else
|
} else
|
||||||
if (value instanceof MediaTrack) {
|
if (value instanceof MediaQueueItem) {
|
||||||
stream.write(134);
|
stream.write(134);
|
||||||
|
writeValue(stream, ((MediaQueueItem) value).toMap());
|
||||||
|
} else
|
||||||
|
if (value instanceof MediaTrack) {
|
||||||
|
stream.write(135);
|
||||||
writeValue(stream, ((MediaTrack) value).toMap());
|
writeValue(stream, ((MediaTrack) value).toMap());
|
||||||
} else
|
} else
|
||||||
if (value instanceof WebImage) {
|
if (value instanceof WebImage) {
|
||||||
stream.write(135);
|
stream.write(136);
|
||||||
writeValue(stream, ((WebImage) value).toMap());
|
writeValue(stream, ((WebImage) value).toMap());
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|
@ -581,6 +642,7 @@ public class PlatformBridgeApis {
|
||||||
void stop();
|
void stop();
|
||||||
void showTracksChooserDialog();
|
void showTracksChooserDialog();
|
||||||
void skipAd();
|
void skipAd();
|
||||||
|
void queueAppendItem(MediaQueueItem item);
|
||||||
|
|
||||||
/** The codec used by CastHostApi. */
|
/** The codec used by CastHostApi. */
|
||||||
static MessageCodec<Object> getCodec() {
|
static MessageCodec<Object> getCodec() {
|
||||||
|
|
@ -813,6 +875,30 @@ public class PlatformBridgeApis {
|
||||||
channel.setMessageHandler(null);
|
channel.setMessageHandler(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
BasicMessageChannel<Object> channel =
|
||||||
|
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.CastHostApi.queueAppendItem", getCodec());
|
||||||
|
if (api != null) {
|
||||||
|
channel.setMessageHandler((message, reply) -> {
|
||||||
|
Map<String, Object> wrapped = new HashMap<>();
|
||||||
|
try {
|
||||||
|
ArrayList<Object> args = (ArrayList<Object>)message;
|
||||||
|
MediaQueueItem itemArg = (MediaQueueItem)args.get(0);
|
||||||
|
if (itemArg == null) {
|
||||||
|
throw new NullPointerException("itemArg unexpectedly null.");
|
||||||
|
}
|
||||||
|
api.queueAppendItem(itemArg);
|
||||||
|
wrapped.put("result", null);
|
||||||
|
}
|
||||||
|
catch (Error | RuntimeException exception) {
|
||||||
|
wrapped.put("error", wrapError(exception));
|
||||||
|
}
|
||||||
|
reply.reply(wrapped);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
channel.setMessageHandler(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static class CastFlutterApiCodec extends StandardMessageCodec {
|
private static class CastFlutterApiCodec extends StandardMessageCodec {
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@class MediaStatus;
|
@class MediaStatus;
|
||||||
@class AdBreakStatus;
|
@class AdBreakStatus;
|
||||||
@class AdBreakClipInfo;
|
@class AdBreakClipInfo;
|
||||||
|
@class MediaQueueItem;
|
||||||
@class CastDevice;
|
@class CastDevice;
|
||||||
@class CastMessage;
|
@class CastMessage;
|
||||||
|
|
||||||
|
|
@ -122,6 +123,15 @@ typedef NS_ENUM(NSUInteger, PlayerState) {
|
||||||
@property(nonatomic, strong, nullable) NSNumber * whenSkippableMs;
|
@property(nonatomic, strong, nullable) NSNumber * whenSkippableMs;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface MediaQueueItem : NSObject
|
||||||
|
@property(nonatomic, strong, nullable) NSNumber * itemId;
|
||||||
|
@property(nonatomic, strong, nullable) NSNumber * playbackDuration;
|
||||||
|
@property(nonatomic, strong, nullable) NSNumber * startTime;
|
||||||
|
@property(nonatomic, strong, nullable) MediaInfo * media;
|
||||||
|
@property(nonatomic, strong, nullable) NSNumber * autoplay;
|
||||||
|
@property(nonatomic, strong, nullable) NSNumber * preloadTime;
|
||||||
|
@end
|
||||||
|
|
||||||
@interface CastDevice : NSObject
|
@interface CastDevice : NSObject
|
||||||
@property(nonatomic, copy, nullable) NSString * deviceId;
|
@property(nonatomic, copy, nullable) NSString * deviceId;
|
||||||
@property(nonatomic, copy, nullable) NSString * friendlyName;
|
@property(nonatomic, copy, nullable) NSString * friendlyName;
|
||||||
|
|
@ -148,6 +158,7 @@ NSObject<FlutterMessageCodec> *CastHostApiGetCodec(void);
|
||||||
- (void)stopWithError:(FlutterError *_Nullable *_Nonnull)error;
|
- (void)stopWithError:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
- (void)showTracksChooserDialogWithError:(FlutterError *_Nullable *_Nonnull)error;
|
- (void)showTracksChooserDialogWithError:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
- (void)skipAdWithError:(FlutterError *_Nullable *_Nonnull)error;
|
- (void)skipAdWithError:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
|
- (void)queueAppendItemItem:(MediaQueueItem *)item error:(FlutterError *_Nullable *_Nonnull)error;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
extern void CastHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<CastHostApi> *_Nullable api);
|
extern void CastHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<CastHostApi> *_Nullable api);
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,10 @@ static NSDictionary<NSString *, id> *wrapResult(id result, FlutterError *error)
|
||||||
+ (AdBreakClipInfo *)fromMap:(NSDictionary *)dict;
|
+ (AdBreakClipInfo *)fromMap:(NSDictionary *)dict;
|
||||||
- (NSDictionary *)toMap;
|
- (NSDictionary *)toMap;
|
||||||
@end
|
@end
|
||||||
|
@interface MediaQueueItem ()
|
||||||
|
+ (MediaQueueItem *)fromMap:(NSDictionary *)dict;
|
||||||
|
- (NSDictionary *)toMap;
|
||||||
|
@end
|
||||||
@interface CastDevice ()
|
@interface CastDevice ()
|
||||||
+ (CastDevice *)fromMap:(NSDictionary *)dict;
|
+ (CastDevice *)fromMap:(NSDictionary *)dict;
|
||||||
- (NSDictionary *)toMap;
|
- (NSDictionary *)toMap;
|
||||||
|
|
@ -272,6 +276,40 @@ static NSDictionary<NSString *, id> *wrapResult(id result, FlutterError *error)
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@implementation MediaQueueItem
|
||||||
|
+ (MediaQueueItem *)fromMap:(NSDictionary *)dict {
|
||||||
|
MediaQueueItem *result = [[MediaQueueItem alloc] init];
|
||||||
|
result.itemId = dict[@"itemId"];
|
||||||
|
if ((NSNull *)result.itemId == [NSNull null]) {
|
||||||
|
result.itemId = nil;
|
||||||
|
}
|
||||||
|
result.playbackDuration = dict[@"playbackDuration"];
|
||||||
|
if ((NSNull *)result.playbackDuration == [NSNull null]) {
|
||||||
|
result.playbackDuration = nil;
|
||||||
|
}
|
||||||
|
result.startTime = dict[@"startTime"];
|
||||||
|
if ((NSNull *)result.startTime == [NSNull null]) {
|
||||||
|
result.startTime = nil;
|
||||||
|
}
|
||||||
|
result.media = [MediaInfo fromMap:dict[@"media"]];
|
||||||
|
if ((NSNull *)result.media == [NSNull null]) {
|
||||||
|
result.media = nil;
|
||||||
|
}
|
||||||
|
result.autoplay = dict[@"autoplay"];
|
||||||
|
if ((NSNull *)result.autoplay == [NSNull null]) {
|
||||||
|
result.autoplay = nil;
|
||||||
|
}
|
||||||
|
result.preloadTime = dict[@"preloadTime"];
|
||||||
|
if ((NSNull *)result.preloadTime == [NSNull null]) {
|
||||||
|
result.preloadTime = nil;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
- (NSDictionary *)toMap {
|
||||||
|
return [NSDictionary dictionaryWithObjectsAndKeys:(self.itemId ? self.itemId : [NSNull null]), @"itemId", (self.playbackDuration ? self.playbackDuration : [NSNull null]), @"playbackDuration", (self.startTime ? self.startTime : [NSNull null]), @"startTime", (self.media ? [self.media toMap] : [NSNull null]), @"media", (self.autoplay ? self.autoplay : [NSNull null]), @"autoplay", (self.preloadTime ? self.preloadTime : [NSNull null]), @"preloadTime", nil];
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation CastDevice
|
@implementation CastDevice
|
||||||
+ (CastDevice *)fromMap:(NSDictionary *)dict {
|
+ (CastDevice *)fromMap:(NSDictionary *)dict {
|
||||||
CastDevice *result = [[CastDevice alloc] init];
|
CastDevice *result = [[CastDevice alloc] init];
|
||||||
|
|
@ -337,9 +375,12 @@ static NSDictionary<NSString *, id> *wrapResult(id result, FlutterError *error)
|
||||||
return [MediaMetadata fromMap:[self readValue]];
|
return [MediaMetadata fromMap:[self readValue]];
|
||||||
|
|
||||||
case 134:
|
case 134:
|
||||||
return [MediaTrack fromMap:[self readValue]];
|
return [MediaQueueItem fromMap:[self readValue]];
|
||||||
|
|
||||||
case 135:
|
case 135:
|
||||||
|
return [MediaTrack fromMap:[self readValue]];
|
||||||
|
|
||||||
|
case 136:
|
||||||
return [WebImage fromMap:[self readValue]];
|
return [WebImage fromMap:[self readValue]];
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -378,14 +419,18 @@ static NSDictionary<NSString *, id> *wrapResult(id result, FlutterError *error)
|
||||||
[self writeByte:133];
|
[self writeByte:133];
|
||||||
[self writeValue:[value toMap]];
|
[self writeValue:[value toMap]];
|
||||||
} else
|
} else
|
||||||
if ([value isKindOfClass:[MediaTrack class]]) {
|
if ([value isKindOfClass:[MediaQueueItem class]]) {
|
||||||
[self writeByte:134];
|
[self writeByte:134];
|
||||||
[self writeValue:[value toMap]];
|
[self writeValue:[value toMap]];
|
||||||
} else
|
} else
|
||||||
if ([value isKindOfClass:[WebImage class]]) {
|
if ([value isKindOfClass:[MediaTrack class]]) {
|
||||||
[self writeByte:135];
|
[self writeByte:135];
|
||||||
[self writeValue:[value toMap]];
|
[self writeValue:[value toMap]];
|
||||||
} else
|
} else
|
||||||
|
if ([value isKindOfClass:[WebImage class]]) {
|
||||||
|
[self writeByte:136];
|
||||||
|
[self writeValue:[value toMap]];
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
[super writeValue:value];
|
[super writeValue:value];
|
||||||
}
|
}
|
||||||
|
|
@ -619,6 +664,26 @@ void CastHostApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<CastH
|
||||||
[channel setMessageHandler:nil];
|
[channel setMessageHandler:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
FlutterBasicMessageChannel *channel =
|
||||||
|
[FlutterBasicMessageChannel
|
||||||
|
messageChannelWithName:@"dev.flutter.pigeon.CastHostApi.queueAppendItem"
|
||||||
|
binaryMessenger:binaryMessenger
|
||||||
|
codec:CastHostApiGetCodec()];
|
||||||
|
if (api) {
|
||||||
|
NSCAssert([api respondsToSelector:@selector(queueAppendItemItem:error:)], @"CastHostApi api (%@) doesn't respond to @selector(queueAppendItemItem:error:)", api);
|
||||||
|
[channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
|
||||||
|
NSArray *args = message;
|
||||||
|
MediaQueueItem *arg_item = args[0];
|
||||||
|
FlutterError *error;
|
||||||
|
[api queueAppendItemItem:arg_item error:&error];
|
||||||
|
callback(wrapResult(nil, error));
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[channel setMessageHandler:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@interface CastFlutterApiCodecReader : FlutterStandardReader
|
@interface CastFlutterApiCodecReader : FlutterStandardReader
|
||||||
@end
|
@end
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,39 @@ class AdBreakClipInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MediaQueueItem {
|
||||||
|
int? itemId;
|
||||||
|
double? playbackDuration;
|
||||||
|
double? startTime;
|
||||||
|
MediaInfo? media;
|
||||||
|
bool? autoplay;
|
||||||
|
double? preloadTime;
|
||||||
|
|
||||||
|
Object encode() {
|
||||||
|
final Map<Object?, Object?> pigeonMap = <Object?, Object?>{};
|
||||||
|
pigeonMap['itemId'] = itemId;
|
||||||
|
pigeonMap['playbackDuration'] = playbackDuration;
|
||||||
|
pigeonMap['startTime'] = startTime;
|
||||||
|
pigeonMap['media'] = media == null ? null : media!.encode();
|
||||||
|
pigeonMap['autoplay'] = autoplay;
|
||||||
|
pigeonMap['preloadTime'] = preloadTime;
|
||||||
|
return pigeonMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
static MediaQueueItem decode(Object message) {
|
||||||
|
final Map<Object?, Object?> pigeonMap = message as Map<Object?, Object?>;
|
||||||
|
return MediaQueueItem()
|
||||||
|
..itemId = pigeonMap['itemId'] as int?
|
||||||
|
..playbackDuration = pigeonMap['playbackDuration'] as double?
|
||||||
|
..startTime = pigeonMap['startTime'] as double?
|
||||||
|
..media = pigeonMap['media'] != null
|
||||||
|
? MediaInfo.decode(pigeonMap['media']!)
|
||||||
|
: null
|
||||||
|
..autoplay = pigeonMap['autoplay'] as bool?
|
||||||
|
..preloadTime = pigeonMap['preloadTime'] as double?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class CastDevice {
|
class CastDevice {
|
||||||
String? deviceId;
|
String? deviceId;
|
||||||
String? friendlyName;
|
String? friendlyName;
|
||||||
|
|
@ -350,14 +383,18 @@ class _CastHostApiCodec extends StandardMessageCodec {
|
||||||
buffer.putUint8(133);
|
buffer.putUint8(133);
|
||||||
writeValue(buffer, value.encode());
|
writeValue(buffer, value.encode());
|
||||||
} else
|
} else
|
||||||
if (value is MediaTrack) {
|
if (value is MediaQueueItem) {
|
||||||
buffer.putUint8(134);
|
buffer.putUint8(134);
|
||||||
writeValue(buffer, value.encode());
|
writeValue(buffer, value.encode());
|
||||||
} else
|
} else
|
||||||
if (value is WebImage) {
|
if (value is MediaTrack) {
|
||||||
buffer.putUint8(135);
|
buffer.putUint8(135);
|
||||||
writeValue(buffer, value.encode());
|
writeValue(buffer, value.encode());
|
||||||
} else
|
} else
|
||||||
|
if (value is WebImage) {
|
||||||
|
buffer.putUint8(136);
|
||||||
|
writeValue(buffer, value.encode());
|
||||||
|
} else
|
||||||
{
|
{
|
||||||
super.writeValue(buffer, value);
|
super.writeValue(buffer, value);
|
||||||
}
|
}
|
||||||
|
|
@ -384,9 +421,12 @@ class _CastHostApiCodec extends StandardMessageCodec {
|
||||||
return MediaMetadata.decode(readValue(buffer)!);
|
return MediaMetadata.decode(readValue(buffer)!);
|
||||||
|
|
||||||
case 134:
|
case 134:
|
||||||
return MediaTrack.decode(readValue(buffer)!);
|
return MediaQueueItem.decode(readValue(buffer)!);
|
||||||
|
|
||||||
case 135:
|
case 135:
|
||||||
|
return MediaTrack.decode(readValue(buffer)!);
|
||||||
|
|
||||||
|
case 136:
|
||||||
return WebImage.decode(readValue(buffer)!);
|
return WebImage.decode(readValue(buffer)!);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -658,6 +698,29 @@ class CastHostApi {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> queueAppendItem(MediaQueueItem arg_item) async {
|
||||||
|
final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
|
||||||
|
'dev.flutter.pigeon.CastHostApi.queueAppendItem', codec, binaryMessenger: _binaryMessenger);
|
||||||
|
final Map<Object?, Object?>? replyMap =
|
||||||
|
await channel.send(<Object>[arg_item]) as Map<Object?, Object?>?;
|
||||||
|
if (replyMap == null) {
|
||||||
|
throw PlatformException(
|
||||||
|
code: 'channel-error',
|
||||||
|
message: 'Unable to establish connection on channel.',
|
||||||
|
details: null,
|
||||||
|
);
|
||||||
|
} else if (replyMap['error'] != null) {
|
||||||
|
final Map<Object?, Object?> error = (replyMap['error'] as Map<Object?, Object?>?)!;
|
||||||
|
throw PlatformException(
|
||||||
|
code: (error['code'] as String?)!,
|
||||||
|
message: error['message'] as String?,
|
||||||
|
details: error['details'],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CastFlutterApiCodec extends StandardMessageCodec {
|
class _CastFlutterApiCodec extends StandardMessageCodec {
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,17 @@ class AdBreakClipInfo {
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
//#region Queue
|
||||||
|
class MediaQueueItem {
|
||||||
|
int? itemId;
|
||||||
|
double? playbackDuration;
|
||||||
|
double? startTime;
|
||||||
|
MediaInfo? media;
|
||||||
|
bool? autoplay;
|
||||||
|
double? preloadTime;
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
class CastDevice {
|
class CastDevice {
|
||||||
String? deviceId;
|
String? deviceId;
|
||||||
String? friendlyName;
|
String? friendlyName;
|
||||||
|
|
@ -283,6 +294,10 @@ abstract class CastHostApi {
|
||||||
void showTracksChooserDialog();
|
void showTracksChooserDialog();
|
||||||
void skipAd();
|
void skipAd();
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
//region Queue
|
||||||
|
void queueAppendItem(MediaQueueItem item);
|
||||||
|
//endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
/// APIs for Host-to-Flutter comunication
|
/// APIs for Host-to-Flutter comunication
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue