tencent cloud


Mobile Playback

Last updated: 2024-02-01 21:58:08
    This document describes some common problems and their solutions for the Player SDKs for Android and iOS.


    What should I do when the "no v4 play info" error occurs?

    For playback through FileId, you need to first use the Adaptive-HLS(10) transcoding template to transcode the video or use the player signature psign to specify the video to be played back; otherwise, the video may fail to be played back.
    If you haven't enabled hotlink protection and a "no v4 play info" error occurs, transcode your video by using the Adaptive-HLS template (ID: 10) or get the playback URL of the video and play it by URL.Please refer to Playback by File ID (VOD) for detailed instructions.

    How do I extract the Player logs to report an error?

    The Player SDK outputs execution logs to local files. Tencent Cloud technical support engineers need them for problem analysis to help you locate the problem.

    How do I pull a Tencent Cloud media asset for playback?

    For security considerations, there are currently no APIs for an application to directly pull a Tencent Cloud media asset. You need to pull a media asset in the following path: application > application service backend > Tencent Cloud. The backend service can call the SearchMedia API to get the media asset list.

    Coexisting with TRTC, the video playback volume becomes lower?

    When TRTC and the player coexist in the project, the volume of the video playback may become lower (suppressed).
    Solution: For SDK versions 10.0 and above, call the attachTRTC method to bind TRTC before creating the player to play the video:
    // iOS code example:
    [_txVodPlayer attachTRTC:trtcCloud];
    [_txVodPlayer startPlay:url]
    // Android code example:

    How to deal with video playback failure caused by using network proxy or capture tools on mobile devices?

    When setting an HTTP proxy on a mobile device, you need to bypass the proxy for localhost.
    Android phone settings example: Go to Settings > Wi-Fi > Connected Wi-Fi > Advanced > Manual > HTTP proxy. In the Bypass proxy field, enter localhost.

    The SDK for Android

    What should I do if no images are displayed during playback?

    Check whether SurfaceView or TextureView is bound to the TXVodPlayer object.

    How do I downsize the package?

    If you haven't used the download cache feature (an API in TXVodDownloadManager) of the SDK v9.4 or earlier and don't need to play back the downloaded files in the SDK v9.5 or later, you don't need to use the SO file of the feature, which helps reduce the size of the installation package. For example, if you have downloaded a cached file by using the setDownloadPath and startDownloadUrl functions of the TXVodDownloadManager class in the SDK v9.4 or earlier, and the getPlayPath path called back by TXVodDownloadManager is stored in the application for subsequent playback, you will need libijkhlscache-master.so to play back the file at the getPlayPath path; otherwise, you won't need it. You can add the following to app/build.gradle:
    exclude "lib/armeabi/libijkhlscache-master.so"
    exclude "lib/armeabi-v7a/libijkhlscache-master.so"
    exclude "lib/arm64-v8a/libijkhlscache-master.so"
    If your application is used only in the Chinese mainland, you can just package the SO files of the armeabi-v7a and arm64-v8a architectures or package only the JAR files and dynamically download the SO files after installation. For detailed directions, see How to Downsize Installation Package.

    How do I make the console output fewer logs?

    You can set LogLevel as follows to filter out unnecessary logs: TXLiveBase.setLogLevel(TXLiveConstants.LOG_LEVEL_DEBUG).

    When playing a video, if the user locks the screen or sends the application to the background, it may cause the player to be killed by the system or disable internet access. How to deal with this situation?

    To avoid this situation, you can use a foreground service within the app. For more information on how to use a foreground service, please refer to the official documentation.

    Network security configuration allows the app to send HTTP requests

    For security reasons, starting from Android P, Google requires that all requests made by the app use encrypted connections. The player SDK will start a local server to proxy HTTP requests. If your app's targetSdkVersion is greater than or equal to 28, you can use network security configuration to allow HTTP requests to be sent to Otherwise, you will encounter the error "java.io.IOException: Cleartext HTTP traffic to not permitted" when playing videos, which will prevent the video from playing. The configuration steps are as follows:
    1. Create a new file network_security_config.xml under res/xml in your project and configure the network security settings.
    <?xml version="1.0" encoding="utf-8"?>
    <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true"></domain>
    2. Add the following attributes to the application tag in the AndroidManifest.xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <manifest ... >
    <application android:networkSecurityConfig="@xml/network_security_config"
    ... >

    The SDK for iOS

    After integrating the SDK, a crash of the type "[TXCThumbPlayer thumbPlayerBundleId] unrecognized selector" occurs after running the app?

    This problem is caused by the SDK containing a category. Here, the "-ObjC" flag needs to be added. The specific steps are as follows:
    Open Xcode, select the corresponding Target, select Build Setting, search for Other Link Flag, and enter -ObjC.

    After integrating the SDK, a crash of the type "dyld[34620]: Library not loaded: @rpath/TXFFmpeg.framework/TXFFmpeg" occurs after running the app?

    This problem is caused by the dynamic library TXFFmpeg.framework being integrated into the project, but "Embed & Sign" is not set:
    1. Open Xcode, select the corresponding Target, and select General.
    2. Select Frameworks, Libraries, and Embedded Content, select TXFFmpeg.framework, and choose Embed & Sign on the right side.

    What should I do if the playback control panel is not displayed?

    The display of the playback control panel is controlled by MPNowPlayingInfoCenter. You can set the nowPlayingInfo attribute to update the title and image and set the volume level. For more information, see LiteAVSDK/Player_iOS.

    How do I make the console output fewer logs?

    You can set LogLevel through the setLogLevel API in TXLiveBase.h as follows: [TXLiveBase setLogLevel:LOGLEVEL_DEBUG]. The greater the value, the fewer the output logs. The value ranges from 0 (output logs of all levels) to 6 (output no logs). For more information, see TXLiveBase.h.

    Encountered an error with code 14010020 when playing a video using appid + fileid?

    This type of problem is caused by the failure to download the file (.mp4 or .hls). Please try using SDK 10.6 or above. This issue has been fixed in the new version.

    When the player downloads an m3u8 file using TXVodDownloadManager, the size and downloadSize values are not available in the TXVodDownloadDelegate callback?

    This issue is caused by the fact that the standard protocol for m3u8 files does not include the file size, and the size of each segment ts can only be obtained when the request is made. Therefore, it is not possible to accurately return the file size before downloading.

    On iOS 13 and above devices, when selecting a video from the photo album for playback, the message "Playback Failed" is displayed?

    This issue is caused by changes in the path accessed by the photo album plugin on iOS 13 and above (such as var/mobile/Containers/Data/PluginKitPlugin/tmp). You can provide path access by copying the album data to a temporary directory at the bottom of the sandbox (such as the tmp directory).
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support