Use the Web Player SDK diagnostic tool

更新时间:
复制 MD 格式

The Web Player SDK includes a built-in diagnostic tool for troubleshooting video playback failures and stuttering. The tool collects basic environment data, network status, and a real-time playback event log so you can pinpoint the cause without external tools.

Prerequisites

Before you begin, configure the following settings on your video playback domain:

  • Enable hotlink protection for Referer and add player.alicdn.com to the allowlist. For more information, see Configure an IP address blacklist/whitelist.

    Note

    player.alicdn.com is the static address for Aliplayer and must be in the allowlist.

    In the Hotlink protection for Referer settings, clear the Allow Direct Access from Browser Address Bar checkbox to block CDN requests with an empty Referer.

  • Add the Access-Control-Allow-Origin header to your video playback domain to enable cross-origin resource sharing (CORS). For more information, see Configure cross-origin resource sharing.

Diagnose playback issues

  1. Open the diagnostic tool.

    Use one of the following methods:

    • From a playback error screen: When a playback error occurs (for example, a "Failed to get the URL" message), click Diagnose on the error screen. The tool opens pre-populated with the error code (code), video ID (vid), uuid, requestId, and playback timestamp.

    • Directly: Go to the diagnostic tool.

  2. Review basic information.

    The Diagnostic Information tab shows environment and network data collected from the user's session: - Basic information: operating system (for example, Windows NT 10.0) and browser (for example, Chrome 90.0.4430.93) - Network information: Image CDN status, Script CDN status, local DNS, ISP, and local IP address

  3. Run a playback test.

    1. On the Video Playback tab, select a playback mode from the Type menu: HTML5, Alibaba Cloud HTML5, or Alibaba Cloud Flash.

    2. Enter either the Source parameter (a direct playback URL) or the Vid and playAuth parameters, then click Play.

      Note

      If both Source and Vid/playAuth are provided, Source takes priority.

    3. Read the playback event log. As playback runs, the tool overlays a live event log on the left side of the video. Each entry shows the event name and its timestamp. The following events are logged:

      Event

      Meaning

      play

      Playback started

      waiting

      Waiting for data

      loadstart

      Began requesting data

      progress

      Requesting data

      loadedmetadata

      Source metadata loaded

      loadeddata

      Current frame data loaded

      canplay

      Enough data to begin playback

      canplaythrough

      Enough data to play through without buffering

      pause

      Playback paused

      ended

      Playback finished

See also

Error codes