package com.ydl.media.audio.enums

/**
 * Created by haorui on 2019-10-27 .
 * Des: 播放模式
 */
enum class PlayModeEnum private constructor(private val value: Int) {
    //列表循环
    LIST_LOOP(0),
    //随机播放
    SHUFFLE(1),
    //单曲循环
    SINGLE_LOOP(2),
    //单曲播放
    SINGLE(3);

    fun value(): Int {
        return value
    }

    companion object {

        fun valueOf(value: Int): PlayModeEnum {
            when (value) {
                1 -> return SHUFFLE
                2 -> return SINGLE_LOOP
                0 -> return LIST_LOOP
                else -> return LIST_LOOP
            }
        }
    }
}
