Hi,
I have integrated a video editor sdk into my Flutter App, it is woring but i am not getting my edits in json like banuba metadata and my audio i attached to my video.
Any positive response would be great!
Thank you.
Hi!
The Video Editor Flutter plugin provides the metadata in a JSON file:
return;
}
// The list of exported video file paths
debugPrint('Exported video files = ${result.videoSources}');
// Preview as a image file taken by the user. Null - when preview screen is disabled.
debugPrint('Exported preview file = ${result.previewFilePath}');
// Meta file where you can find short data used in exported video
debugPrint('Exported meta file = ${result.metaFilePath}');
}
void _handlePlatformException(PlatformException exception) {
_errorMessage = exception.message ?? 'unknown error';
// You can find error codes 'package:ve_sdk_flutter/errors.dart';
debugPrint("Error: code = ${exception.code}, message = $_errorMessage");
setState(() {});
}
Also, audio metadata can be obtained from the result in JSON format:
import 'dart:convert';
import 'package:flutter/material.dart';
enum AudioType { track, voice }
class AudioMetadata {
final String title;
final String audioUrl;
final AudioType type;
AudioMetadata({required this.title, required this.audioUrl, required this.type});
static List<AudioMetadata> parseAudioMetadata(String? jsonString) {
if (jsonString == null || jsonString.isEmpty) {
return [];
}
try {
final decoded = jsonDecode(jsonString);
This file has been truncated. show original