Package com.brightcove.player.edge
Class VideoParser
java.lang.Object
com.brightcove.player.edge.VideoParser
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
VideoParser
public VideoParser()
-
-
Method Details
-
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 objecteventEmitter
- The SDK event emitter object.- Returns:
- the Video Playlist
- Throws:
org.json.JSONException
- the json exceptionVideoParseException
- if the JSON object does not have the minimum required properties to create a Video.- See Also:
-
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 objecteventEmitter
- The SDK event emitter object.- Returns:
- the video
- Throws:
org.json.JSONException
- the json exceptionVideoParseException
- if the JSON object does not have the minimum required properties to create the Video.- See Also:
-