com.brightcove.player.edge

## Class VideoParser

- java.lang.Object
- - com.brightcove.player.edge.VideoParser

-     public final class VideoParser
      extends java.lang.Object

  Utility class used to create a `Video` object from a `JSONObject` instance. The `JSONObject` properties must correspond to the Brightcove Playback API JSON response.

  For for information about the Brightcove Playback API, please visit https://support.brightcove.com/overview-playback-api.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VideoParser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Playlist` | `buildPlaylistFromJSON(org.json.JSONObject json, EventEmitter eventEmitter)` Builds a Video Playlist from a Brightcove Playback API json object.
    `static Video` | `buildVideoFromJSON(org.json.JSONObject json, EventEmitter eventEmitter)` Builds a Video from a Brightcove Playback API json object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VideoParser

          public VideoParser()

  - ### Method Detail

    - #### buildPlaylistFromJSON

          public static Playlist buildPlaylistFromJSON(org.json.JSONObject json,
                                                       EventEmitter eventEmitter)
                                                throws org.json.JSONException,
                                                       VideoParseException

      Builds a Video Playlist from a Brightcove Playback API json object.
      Parameters:
        `json` - the json object
        `eventEmitter` - The SDK event emitter object.
      Returns:
        the Video Playlist
      Throws:
        `org.json.JSONException` - the json exception
        `VideoParseException` - if the JSON object does not have the minimum required properties to create a Video.
      See Also:
        https://support.brightcove.com/overview-playback-api

    - #### buildVideoFromJSON

          public static Video buildVideoFromJSON(org.json.JSONObject json,
                                                 EventEmitter eventEmitter)
                                          throws org.json.JSONException,
                                                 VideoParseException

      Builds a Video from a Brightcove Playback API json object.
      Parameters:
        `json` - the json object
        `eventEmitter` - The SDK event emitter object.
      Returns:
        the video
      Throws:
        `org.json.JSONException` - the json exception
        `VideoParseException` - if the JSON object does not have the minimum required properties to create the Video.
      See Also:
        https://support.brightcove.com/overview-playback-api