Web Player SDK Events

Anterior Siguiente

Below is a list of all events sent by the SDK.

Eventos

módulo: kit de desarrollo de software global

event: player-ready

Callback when Web Player SDK is ready. Todos los módulos están cargados.

módulo: reproductor multimedia

event: stream-start

La reproducción del stream comenzó.

módulo: reproductor multimedia

event: stream-stop

La reproducción del stream se detuvo.

módulo: reproductor multimedia

event: stream-select
Se seleccionó un punto de montaje de stream.

módulo: reproductor multimedia

event: stream-config-ready
La configuración del stream en vivo está lista.

módulo: reproductor multimedia

event: stream-config-error
El análisis de la configuración del stream en vivo devuelve un error.

módulo: reproductor multimedia

event: stream-config-load-error
La carga de la configuración del stream en vivo devuelve un error.

módulo: reproductor multimedia

event: stream-fail

La conexión al stream falló.

módulo: reproductor multimedia

event: stream-error

Ocurrió un error en el stream

propiedades del evento:

texto (Secuencia) El texto del error.

módulo: reproductor multimedia

event: stream-status

Información del estado del stream.

propiedades del evento:

  • status (String) The status text message "Playback of media in the current context or situation is not allowed." Available in English, French, Spanish and Portuguese (depending the OS language).

  • code (String Status code, refer to the list below.)

  • message (String). Field for adding error or other event message.

Aquí le ofrecemos la lista de los mensajes de estado y sus códigos asociados.

El código puede usarse para mostrar un mensaje que no sea el predeterminado proporcionado en la propiedad "estado".

Código

Estado

LIVE_PAUSE

Stopped

LIVE_PLAYING

Al aire

LIVE_STOP

Desconectado

LIVE_FAILED

Stream no disponible

LIVE_BUFFERING

Almacenando...

LIVE_CONNECTING

Conexión del stream en vivo en progreso...

LIVE_RECONNECTING

Reconectará el stream en vivo en x segundos

HLS_STREAM_GEOBLOCKED

Lo sentimos, este contenido no está disponible en su área

STATION_NOT_FOUND

No se encontró la estación

PLAY_NOT_ALLOWED

Playback of media in the current context or situation is not allowed

Note: when a live stream is geo-blocked, LIVE_FAILED is received. When an HLS stream is geo-blocked, HLS_STREAM_GEOBLOCKED is received.

módulo: reproductor multimedia

event: track-cue-point

A new track cue point was received in the stream.

propiedades de los datos de evento:

  • cuePoint (Object) - The properties of the cuePoint object are:

    • cueTitle (String) - The title of the song

    • artistName (String) - The artist name

    • albumName (String) - The album name

  • parameters (Object) - The original parameters list sent by the cue point.

Ejemplo (JavaScript):

/** Attach an addEventListener to the TD Web Player SDK instance **/
player.addEventListener( 'track-cue-point', onTrackCuePoint );
 
function onTrackCuePoint( event )
{
   var cueTitle = event data.cuePoint.cueTitle;
}

módulo: reproductor multimedia

event: custom-cue-point

A new custom cue point was received in the stream.

propiedades de los datos de evento:

  • cuePoint (Object) containing the custom properties.

  • parameters (Object) - The original parameters list sent by the cue point.

módulo: reproductor multimedia

event: speech-cue-point

A new speech cue point was received in the stream.

propiedades de los datos de evento:

  • cuePoint (Object) - The properties of the cuePoint object are:

    • cueTitle (String) - The title of the song

    • artistName (String) - The artist name for the song

  • parameters (Object) - The original parameters list sent by the cue point.

For other parameters available within this cuepoint, please refer to the STWCue Metadata Dictionary.

módulo: reproductor multimedia

event: hls-cue-point

A new HLS cue point has been received in the stream (iOS only).

propiedades de los datos de evento:

  • cuePoint (Object) - The properties of the cuePoint object are:

    • hls_track_id (String) - Track ID of the following segment.

    • hls_segment_id (String) - Segment ID of the following segment.

módulo: reproductor multimedia

event: timeout-alert

Alerta de expiración de la conexión: el stream se detendrá en 30 segundos.

Please refer to the play() function documentation (parameter connectionTimeOut) .

módulo: reproductor multimedia

event: timeout-reach

La conexión expiró (el usuario no hizo clic en el mensaje anterior de alerta de expiración de conexión).

En este momento, el kit de desarrollo de software del reproductor detuvo el stream automáticamente.

módulo: reproductor multimedia

event: targetspot-cue-point

A new TargetSpot cue point was received in the stream.

propiedades del evento:

duration: duration of the TargetSpot Ad Break, in milliseconds

módulo: reproductor multimedia

event: timeshift-info

Provides general information about the HLS stream. Embed the code snippet described under Event Listener to subscribe to the information.

propiedades del evento:

totalDuration: duration of the Timeshift session, in milliseconds

módulo: reproductor multimedia

event: ad-break-cue-point

A new Ad Break cue point was received in the stream.

propiedades del evento:

  • adBreakData (Object) - The properties of the adBreakData object are:

    • url (String) - The url of the synchronized banner

    • duration (Integer) - The duration of the Ad Break

    • cueTitle (String) - The title of the Ad Break

    • adVast (String) - Ad VAST response.

    • vastUrl (String) - URL to get the VAST.

    • duration (String) - Ad duration

módulo: reproductor multimedia

event: ad-break-cue-point-complete

El corte publicitario actual terminó.

módulo: reproductor multimedia

event: ad-playback-start

Reproducción de anuncio: cada vez que comienza la reproducción de un anuncio de audio/video, se activa este evento.

propiedades del evento:

type (String)  - The Ad Server Type (i.e. vastAd when VAST Ad Server was used).

módulo: reproductor multimedia

event: ad-blocker-detected

Se activa este evento cuando el cliente tiene habilitado un bloqueador de anuncios.

propiedades del evento:

message (String)  - The Ad blocker message.

módulo: reproductor multimedia

event: ad-playback-complete

Reproducción de anuncio: cada vez que una reproducción de anuncio de audio/video está completa, se activa este evento. This is where you should call the play() function to play the Live Stream.

propiedades del evento:

type (String) - The Ad Server Type (i.e. vastAd when VAST Ad Server was used).

módulo: reproductor multimedia

event: ad-playback-error

Reproducción de anuncio: cada vez que una reproducción de anuncio de audio/video devuelve un error (es decir, el anuncio no se pudo reproducir), se activa este evento. This is where you should call the play() function to play the Live Stream.

módulo: reproductor multimedia

event: ad-countdown

Ad CountDown: el evento es activado cuando se está reproduciendo un anuncio de audio/video, lo cual le permite mostrar un mensaje de cuenta regresiva (por ejemplo: Publicidad: el stream comenzará en xx segundos)

propiedades del evento:

  • countDown (Integer) - The value in seconds before the end of the ad.

módulo: reproductor multimedia

event: ad-quartile

Ad Quartile. Se acciona el evento en cada cuartil, cuando se está reproduciendo un anuncio de audio/video.

propiedades del evento:

  • type (String) - The possible values for type are:

    • start (ad playback start = 0 %)

    • firstQuartile (25 %)

    • midpoint (50 %)

    • thirdQuartile (75 %)

    • complete (100 %)

módulo: reproductor multimedia

event: vpaid-ad-companions

Campaña VPAID: cuando una campaña VPAID contiene complementos de anuncios, se activa este evento. Escuche este evento para mostrar los complementos de anuncios VPAIS en la página.

propiedades del evento:

  • companions (Array) - Array of VAST companion ads

módulo: reproductor multimedia

event: configuration-error

Error de configuración - Se acciona un error del evento porque el objeto de datos JSON que se envió a la biblioteca es inválido.
Verifique si el objeto de datos JSON es correcto.

módulo: reproductor multimedia

event: stream-geo-blocked

El stream tiene bloqueo geográfico. Se activa el evento cuando la llamada al servidor de aprovisionamiento devuelve un estado "Stream Geo Blocked".
La conexión al stream no será posible. Se debería mostrar un mensaje al usuario, como por ejemplo: "Sorry, the stream is not available in your area"("Lo sentimos, el stream no está disponible en su área").

módulo: reproductor multimedia

event: video-mid-roll-playback-start

Reproducción de anuncio durante podcast de video: cada vez que se comienza a reproducir un anuncio durante podcast de video, se activa este evento.

módulo: reproductor multimedia

event: video-mid-roll-playback-complete

Reproducción de anuncio durante podcast de video: cada vez que un anuncio durante podcast de video está completo, se activa este evento.

módulo: SyncBanners

event: ad-break-synced-element

Un banner de corte publicitario está disponible en el punto de referencia de corte publicitario y se cargará y mostrará automáticamente en su elemento div HTML en la página.

propiedades del evento:

  • type (String) - The synced banner type. Posibles valores: legacy o VAST.

  • id (String) - The HTML banner ID, as defined in the "elements" property of the SyncBanners module.

  • data (Object) - Defined only if type is VAST. Contiene la propiedad del objeto VAST del banner.

  • url (String) - Defined only if type is legacy. Contiene el URL del banner sincronizado.

módulo: NowPlayingApi

event: list-loaded

Historial de reproducción en curso cargado. Se activa el evento cuando los datos del historial de reproducción en curso ha sido cargado y está disponible.

propiedades del evento:

  • data (Object) - List of Now playing data (track, ad, speech)

/** Attach an addEventListener to the TD Web Player SDK instance **/
player.addEventListener( 'list-loaded', onListLoaded );
 
function onListLoaded( e )
{
    console.log( 'tdplayer::onListLoaded' );
    console.log( e.data );
    $.each( e.data.list, function(index, item){
       console.log('Artist : ' + item.artistName );
       console.log('Title : ' + item.cueTitle );
       console.log('Time : ' + item.cueTimeStart );
    } );
}

módulo: NowPlayingApi

event: list-empty

El historial de reproducción en curso está vacío (no hay datos). Se activa el evento cuando los datos del historial de reproducción en curso ha sido cargado y está vacío.

/** TD Web Player SDK instance **/
var player = new TDSdk( tdPlayerConfig );
 
/** Attach an addEventListener to the TD Player SDK instance **/
player.addEventListener( 'list-empty', onListEmpty);
 
function onListEmpty( e )
{
    console.log( 'tdplayer::onListEmpty' );
}

módulo: NowPlayingApi

event: nowplaying-api-error

Error de API de reproducción en curso - Se activa el evento cuando no fue posible recuperar los datos del historial de reproducción en curso debido a un error.

/** TD Player SDK instance **/
var player = new TDSdk( tdPlayerConfig );
 
/** Attach an addEventListener to the TD Player SDK instance **/
player.addEventListener( 'nowplaying-api-error', onNowPlayingApiError);
 
function onNowPlayingApiError( e )
{
    console.log( 'tdplayer::onNowPlayingApiError' + e );
}



© 2026 Triton Digital. Todos los derechos reservados.