package com.platform.modules.live.dto;

import lombok.Data;
import lombok.ToString;
import net.sf.json.JSONObject;

/**
 * @Description:
 * @Author: yikaihong
 * @CreateDate: 2019/1/20 17:57
 * @Version: 1.0
 */

@Data
@ToString
public class StreamInfoResponseDto {

    private String transcodeConfig;
    private String videoFormat;
    private String outputStreamUrl;

    public StreamInfoResponseDto(JSONObject object){
        if(object.containsKey("TranscodeConfig")){
            this.transcodeConfig = object.getString("TranscodeConfig");
        }
        if(object.containsKey("VideoFormat")){
            this.videoFormat = object.getString("VideoFormat");
        }
        if(object.containsKey("OutputStreamUrl")){
            this.outputStreamUrl = object.getString("OutputStreamUrl");
        }
    }
}