setLiveSts method

Future<void> setLiveSts({
  1. String? url,
  2. String? accessKeyId,
  3. String? accessKeySecret,
  4. String? securityToken,
  5. String? region,
  6. String? domain,
  7. String? app,
  8. String? stream,
  9. EncryptionType? encryptionType,
  10. List<String>? definitionList,
  11. dynamic playerId,
})

使用LiveSts 方式播放直播流

Implementation

Future<void> setLiveSts(
    {String? url,
    String? accessKeyId,
    String? accessKeySecret,
    String? securityToken,
    String? region,
    String? domain,
    String? app,
    String? stream,
    EncryptionType? encryptionType,
    List<String>? definitionList,
    playerId}) async {
  Map<String, dynamic> liveStsInfo = {
    "url": url,
    "accessKeyId": accessKeyId,
    "accessKeySecret": accessKeySecret,
    "securityToken": securityToken,
    "region": region,
    "domain": domain,
    "app": app,
    "stream": stream,
    "encryptionType": encryptionType?.index.toString(),
    "definitionList": definitionList,
  };
  return FlutterAliPlayerFactory.methodChannel
      .invokeMethod("setLiveSts", wrapWithPlayerId(arg: liveStsInfo));
}