VideoEditor SDK supports serialization and deserialization, allowing your users to save and revise their work at any time. Serialization requires the
backend:serializer module. Refer to our documentation on how to include the module in your project.
For the sake of this example, we load a video from the resources into the video editor.
VideoEditorSaveSettings to set the
outputMode to only export the
SettingsList (instead of the video). This
SettingsList will be used later for serialization. You can choose to skip this step and both the video as well as the
SettingsList will be exported.
The result from the editor is received in the
EditorSDKResult wraps around the intent and provides a convenient API to check the result. Here, we launch a coroutine using
Dispatchers.IO. Inside the coroutine, we create a file, obtain the
EditorSDKResult.settingsList), and serialize it using the
IMGLYFileWriter.writeJson() method. You can optionally serialize the
SettingsList into a
IMGLYFileWriter.writeJsonAsString()) or a
For details on the JSON structure you can download our schema.
For further processing, you can upload the serialization to a remote server (compare Save Video To Remote URL) to make the editor state available on other devices as well.
The next section explains how to restore the editor state by deserializing these settings.