Commit a6391c5a by tanghuan

上传视频时,请求obs生成封面

1 parent b4b90ea3
import 'dart:convert';
import 'dart:io';
import 'package:appframe/config/constant.dart';
......@@ -188,9 +189,9 @@ class UploadFileHandler extends MessageHandler {
///
/// 8 针对视频生成封面
///
// if (mimeType?.startsWith('video/') ?? false) {
// await _genHwVideoCover(dio, objectKey);
// }
if (mimeType?.startsWith('video/') ?? false) {
await _genHwVideoCover(dio, objectKey);
}
dio.close(force: true);
bxeApiService.close();
......@@ -334,15 +335,16 @@ class UploadFileHandler extends MessageHandler {
"api-key": 'FJ9qv53Bxp',
};
var params = {
"videoKeys": keys,
"videoKeys": [keys],
"outputSuffix": "_p1",
};
await dio.post(
'$_genBaseUrl/go/mpc/create_covers',
data: params,
data: jsonEncode(params),
options: Options(
headers: headers,
contentType: 'application/json',
responseType: ResponseType.json,
),
);
} catch (e) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!