ApsaraVideo Player SDK for web V2.1.0 and later allow you to configure the playback delay and the message that notifies users of the playback delay. This feature can be used to play videos during transcoding.
Configuration method
The infoDisplay component is used to display the message that notifies users of the playback delay.
To enable the playback delay, set the autoplay property of the infoDisplay component to true.
If you use the skinLayout property to customize player components, you need to enable the infoDisplay component in the skinLayout property. The following code provides an example on how to enable the infoDisplay component when you configure the skinLayout property:
skinLayout:[ ...... {name: "errorDisplay", align: "tlabs", x: 0, y: 0}, {name: "infoDisplay", align: "cc"}, ...... ]
For more information about the skinLayout property, see Configure skinLayout.
The infoDisplay component provides two properties for you to configure the playback delay and message.
autoPlayDelay: specifies the playback delay. Unit: seconds.
autoPlayDelayDisplayText: specifies the message that notifies users of the playback delay. Example: "Transcoding" or "Please wait".