Ejemplo n.º 1
0
instances.forEach(api => {
    if (api.getState() === STATE_ERROR) {
        const errorIconContainer = api.getContainer().querySelector('.jw-error-msg .jw-icon');
        if (errorIconContainer && !errorIconContainer.hasChildNodes()) {
            errorIconContainer.appendChild(ErrorContainer.cloneIcon('error'));
        }
    }
});
Ejemplo n.º 2
0
 function _errorHandler(model, evt) {
     if (!evt) {
         _title.playlistItem(model, model.get('playlistItem'));
         return;
     }
     const errorContainer = ErrorContainer(model, evt.message);
     if (ErrorContainer.cloneIcon) {
         errorContainer.querySelector('.jw-icon').appendChild(ErrorContainer.cloneIcon('error'));
     }
     _title.hide();
     _playerElement.appendChild(errorContainer.firstChild);
     toggleClass(_playerElement, 'jw-flag-audio-player', !!model.get('audioMode'));
 }