📜  licenceUrl - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.138000             🧑  作者: Mango

代码示例1
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();