Example usage for com.google.gwt.media.dom.client MediaError MEDIA_ERR_NETWORK

List of usage examples for com.google.gwt.media.dom.client MediaError MEDIA_ERR_NETWORK

Introduction

In this page you can find the example usage for com.google.gwt.media.dom.client MediaError MEDIA_ERR_NETWORK.

Prototype

int MEDIA_ERR_NETWORK

To view the source code for com.google.gwt.media.dom.client MediaError MEDIA_ERR_NETWORK.

Click Source Link

Document

A constant returned by #getCode indicating that playback was aborted due to a network error.

Usage

From source file:com.ait.lienzo.client.core.shape.Movie.java

License:Open Source License

private final void setErrorCode(int code) {
    switch (code) {
    case MediaError.MEDIA_ERR_ABORTED:
        m_error = MessageConstants.MESSAGES.moviePlaybackWasAborted();
        break;/*from www  .j  a va2  s .co  m*/
    case MediaError.MEDIA_ERR_NETWORK:
        m_error = MessageConstants.MESSAGES.movieNetworkError();
        break;
    case MediaError.MEDIA_ERR_DECODE:
        m_error = MessageConstants.MESSAGES.movieErrorInDecoding();
        break;
    case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:
        m_error = MessageConstants.MESSAGES.movieFormatNotSupported();
        break;
    }
}

From source file:com.emitrom.lienzo.client.core.shape.Movie.java

License:Open Source License

private final void init() {
    if (null != m_video) {
        MediaError status = m_video.getError();

        if (status != null) {
            switch (status.getCode()) {
            case MediaError.MEDIA_ERR_ABORTED:
                m_error = MessageConstants.MESSAGES.moviePlaybackWasAborted();
                break;
            case MediaError.MEDIA_ERR_NETWORK:
                m_error = MessageConstants.MESSAGES.movieNetworkError();
                break;
            case MediaError.MEDIA_ERR_DECODE:
                m_error = MessageConstants.MESSAGES.movieErrorInDecoding();
                break;
            case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:
                m_error = MessageConstants.MESSAGES.movieFormatNotSupported();
                break;
            }//from  ww w.  j a  v  a 2s .  c o m
        }
    } else {
        m_error = MessageConstants.MESSAGES.movieNotSupportedInThisBrowser();
    }
    m_inits = true;
}