This topic answers common questions about integrating the video editing SDK for web.
Error adding a media asset to the timeline
-
Symptom: When you add a media asset to the timeline, an error message such as "Image data error (****)" appears in a red banner at the top of the editor and includes the specific asset file ID.
-
Possible cause: The cross-origin resource sharing (CORS) policy for the OSS bucket that stores the media asset is not configured correctly.
-
Solution: In the OSS console, select the bucket that stores the media asset. Navigate to and click Create Rule. Configure the rule as follows: set Origin to
*, select GET and POST for Allowed Methods, set Cache Time (sec) to0, and select the Return Vary: Origin checkbox.
Supported preview formats for media assets
|
Type |
Format |
|
Video |
MP4, WEBP, MKV, MOV, and M3U8 |
|
Audio |
MP3 |
|
Image |
JPG, JPEG, PNG, WEBP, and GIF |
We have not verified other media asset formats for preview. You can still add them to the track area for editing and production.
"Format not supported for preview" error
-
Symptom: When you add a media asset in a supported format to a track, this message appears: "Your browser does not support preview for the current format. Your edits will be applied during production."
-
Possible cause: The media asset's
titlefield is missing the file name extension. -
Solution: Check the return values of the
getEditingProjectMaterialsandsearchMediafunctions. Ensure that the media asset'stitlefield includes the file name extension. If not, append the correct file name extension.
API calls for intelligent tasks fail
Intelligent tasks, such as intelligent speech recognition and text-to-speech, are supported only in the China (Shanghai) and China (Beijing) regions. Ensure that you make API calls from a supported region.
Black screen with audio during playback
-
Possible cause: Your browser does not support videos encoded with H.265, or hardware acceleration is disabled in your browser.
-
Solution: To troubleshoot this issue in Google Chrome, first try playing the video by entering its URL directly into the address bar. If you still hear audio but see a black screen, your browser does not support the H.265 codec. Next, navigate to chrome://settings/system and ensure that hardware acceleration is enabled.
The sample code cannot be run directly
The sample code is for reference only. To run it, you must implement the following:
-
You must provide several server-side APIs. These APIs add authentication information to requests and forward them from your frontend to the Alibaba Cloud server.
-
On the frontend, you must implement a function to handle network requests, which corresponds to the
requestfunction in the sample code. You can use an open-source library like Axios or an existing request utility in your project. -
Build the UI that appears after you click Add from Media Asset Library. In this UI, you can implement local upload, or display existing media assets from the media asset library.
-
Build the UI that appears after you click Generate. This UI lets you configure output parameters for production. After you click OK, pass these parameters to the Alibaba Cloud server.