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.comto the allowlist. For more information, see Configure an IP address blacklist/whitelist.Noteplayer.alicdn.comis 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-Originheader to your video playback domain to enable cross-origin resource sharing (CORS). For more information, see Configure cross-origin resource sharing.
Diagnose playback issues
-
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.
-
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
-
Run a playback test.
On the Video Playback tab, select a playback mode from the Type menu: HTML5, Alibaba Cloud HTML5, or Alibaba Cloud Flash.
-
Enter either the Source parameter (a direct playback URL) or the Vid and playAuth parameters, then click Play.
NoteIf both Source and Vid/playAuth are provided, Source takes priority.
-
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
playPlayback started
waitingWaiting for data
loadstartBegan requesting data
progressRequesting data
loadedmetadataSource metadata loaded
loadeddataCurrent frame data loaded
canplayEnough data to begin playback
canplaythroughEnough data to play through without buffering
pausePlayback paused
endedPlayback finished