MoviaBox/ShortPlay/Class/Player/Model/SPSpeedModel.swift

42 lines
744 B
Swift

//
// SPSpeedModel.swift
// ShortPlay
//
// Created by on 2025/4/10.
//
import UIKit
struct SPSpeedModel {
enum Speed: String {
case x0_75 = "0.75x"
case x1 = "1.0x"
case x1_25 = "1.25x"
case x1_5 = "1.5x"
case x2 = "2.0x"
func getRate() -> Float {
switch self {
case .x0_75:
return 0.75
case .x1:
return 1
case .x1_25:
return 1.25
case .x1_5:
return 1.5
case .x2:
return 2
}
}
}
var speed: Speed = .x1
}