
package com.tmerclub.cloud.live.constant;

/**
 * 播放类型 1.rtmp 2.flv 3.m3u8
 * @author Yami
 */
public enum PlayBackType {

    /** RTMP */
    RTMP(1),

    /** FLV */
    FLV(2),

    /** M3U8 */
    M3U8(3);

    private final Integer code;

    public Integer value() {
        return code;
    }

    PlayBackType(Integer code) {
        this.code = code;
    }

    public static PlayBackType instance(Integer value) {
        PlayBackType[] enums = values();
        for (PlayBackType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }

}
