Files
2026-03-25 17:28:35 +01:00

49 lines
1.1 KiB
Swift
Generated

///
/// VideoPlayerStatus.swift
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///
/**
* Represents the JS union `VideoPlayerStatus`, backed by a C++ enum.
*/
public typealias VideoPlayerStatus = margelo.nitro.video.VideoPlayerStatus
public extension VideoPlayerStatus {
/**
* Get a VideoPlayerStatus for the given String value, or
* return `nil` if the given value was invalid/unknown.
*/
init?(fromString string: String) {
switch string {
case "idle":
self = .idle
case "loading":
self = .loading
case "readyToPlay":
self = .readytoplay
case "error":
self = .error
default:
return nil
}
}
/**
* Get the String value this VideoPlayerStatus represents.
*/
var stringValue: String {
switch self {
case .idle:
return "idle"
case .loading:
return "loading"
case .readytoplay:
return "readyToPlay"
case .error:
return "error"
}
}
}