externalMedia method
Future<Channel>
externalMedia(
- dynamic callback(
- bool,
- Channel
), {
- required String app,
- dynamic variables,
- required dynamic external_host,
- String? encapsulation,
- String? transport,
- String? connection_type,
- required String format,
- String? direction,
})
Implementation
Future<Channel> externalMedia(
Function(bool, Channel) callback, {
required String app, //: string;
dynamic variables, //?: Containers;
required external_host, //: string;
String? encapsulation, //?: string;
String? transport, //?: string;
String? connection_type, //?: string;
required String format, //: string;
String? direction, //?: string;
}) async {
var resp = await ChannelsApi.externalMedia(
app: app,
variables: variables,
external_host: external_host,
encapsulation: encapsulation,
transport: transport,
connection_type: connection_type,
format: format,
direction: direction);
//print(resp.resp);
var channelJson = resp.resp;
Channel channel = Channel.fromJson(jsonDecode(channelJson));
statisChannels[channel.id] = channel;
return channel;
// resp.then((value) {
// if (value.statusCode == 200 || value.statusCode == 204)
// callback(false, this);
// else
// callback(true, this);
// });
}