This topic provides answers to commonly asked questions about media asset upload.

What can I do if the upload SDK for iOS fails to upload files with an error Error Domain=NSCocoaErrorDomain?

Typically, the upload failure with the error code 207 and error message Error Domain=NSCocoaErrorDomain is usually caused by a file read error and lack of permissions. You can use either of the following methods to solve the problem:
  • Method 1: Grant the permission for reading local resources to the upload SDK for iOS.
  • Method 2: Store local resources in the sandbox directory before uploading.

What can I do if a compatibility issue occurs when I use the SDK for JavaScript to upload a media file in WeChat?

This issue occurs because the WeChat browser is not compatible with the HTML5 player. To resolve this issue, delete the multiple="" parameter from <input type="file" name="file" id="files" multiple="">.

What can I do if the preview page is stretched when the resolution is set to 480p in the stream ingest SDK?

When the resolution of an ingested stream is set to 480p in the stream ingest SDK, the video image of the stream is properly displayed. However, the preview page may be stretched. This issue occurs because the resolution of a 480p video is 480 × 640 pixels, which is not supported by most mobile phone screens.

To resolve this issue, modify the settings of the SurfaceView parameter for the preview page in the activity_push.xml file, as shown in the following figure. TFpnKZEWmJXIKEqkNHdU.png poYUFCTzncXdWoUOyJKp.png

How can I view and import an AAR package in Android Studio?

To view files in an AAR package, change the file name extension of the package from .aar to .zip and decompress the package. Then, you can view the .class files, .xml files, .jar files, images, and text files in the package.

To import an AAR package, perform the following steps:
  1. Copy the .aar package to your project and reload the project. Generally, copy the package to the Project name/libs/ directory.
  2. In the build.gradle file, add the path of an on-premises repository to the root tag and add the compilation dependencies to the dependencies part.
    Replace libs in the sample code with the name of the directory to which the AAR package is imported. In the compile parameter, set the name field to the name of the AAR package and the ext field to the file name extension. IdybZmRLnUQfWAveqGGK.png
  3. Choose Build > Rebuild to rebuild the project.
    When the project is rebuilt, the imported AAR package is displayed in the External Libraries directory of the project. jwqQxvgFgbACgUTpklPK.png


For more information about the upload process and description, see the following documents based on your business requirements:
  • To upload media files by using the ApsaraVideo VOD console or upload tools on a PC, see Upload by using tools.
  • To upload media files by using the upload SDK of ApsaraVideo for VOD, OSS SDK, URLs of source files, or OSS API operations, see Upload by developers