JSONObject jsonObject = new JSONObject();
try{
jsonObject.put("licenseUrl", licenseUrl);
} catch (JSONException e){
Utils.log("Failed to add license to Json object.");
}
MediaInfo mediaInfo =
new MediaInfo.Builder(videoUrl)
.setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)
.setContentType("video/mp4")
.setMetadata(movieMetadata)
.setStreamDuration(currentPosition)
.setCustomData(jsonObject)
.build();
return new MediaQueueItem.Builder(mediaInfo).build();