support Contact Support | system status System Status
Page Contents

    Error Messages from the Native SDK for Android

    In this topic, you will learn about the error messages returned by the Brightcove player SDK for Android.

    Error messages

    The error messages that are defined in the Brightcove player SDK for Android can be found in the SDK Reference document.

    EventType errors

    Refer to the SDK Reference doc for a complete list of EventType messages.

    Field Description
    AD_ERROR When a plugin encounters an error while playing an advertisement, it will emit this event.
    CLOSED_CAPTIONING_ERROR Indicates that there was an error processing closed captioning information.
    ERROR Indicates an error occurred in a component in the course of processing an earlier event.
    ODRM_LICENSE_ERROR This event will be fired when an offline playback license could be acquired because of an error that occurred during the license retrieval process. The event property Event.VIDEO will point the Video. Please inspect the property Event.ERROR for the actual cause of the failure.
    ODRM_LICENSE_NOT_AVAILABLE This event will be fired when an offline playback license was not provided by the license server.
    ODRM_PLAYBACK_NOT_ALLOWED This event will be fired when download is requested for a video that is not eligible for offline playback.
    ODRM_SOURCE_NOT_FOUND This event will be fired when download is requested for a video that does not include any Source suitable of offline playback.
    SOURCE_NOT_FOUND Indicates a Source is not found by the current player.
    SOURCE_NOT_PLAYABLE Indicates a Source is not playable by the current player.
    VIDEO_DOWNLOAD_FAILED This event will be fired when a Video download fails.

    GoogleIMAEventType errors

    Refer to the SDK Reference doc for a complete list of GoogleIMAEventType messages.

    Field
    DID_FAIL_TO_PLAY_AD

    Pass-through messages

    Most error messages are passed through from the component being called within your app. This includes messages returned from calls to the Brightcove API's.

    Error listener

    The onError() method handles errors that occur during asynchronous operations. You will get this callback only if there is a message property in the JSON response or there is an exception while parsing the JSON object.

    Error EventType

    Most errors that are passed through the Native SDK will be emitted through the EventType.ERROR with some properties, including the exception. Here is an example of how you can listen for these errors:

    eventEmitter.on(EventType.ERROR, new EventListener() {
    @Override
    public void processEvent(Event event) {
    	Exception exception = (Exception) event.properties.get(Event.ERROR);
    	String message = (String) event.properties.get(Event.ERROR_MESSAGE);
    	Video video = (Video) event.properties.get(Event.VIDEO);
    	Source source = (Source) event.properties.get(Event.SOURCE);
    	if (event.properties.containsKey("error_code")) {
    		String errorCode = (String) event.properties.get("error_code");
    		Log.e(TAG, "Error code: " + errorCode);
    	}
    }
    });


    Page last updated on 28 Sep 2020