mirror of
https://github.com/tappollo/OSCKit.git
synced 2026-03-28 17:18:08 +08:00
35 lines
762 B
Swift
35 lines
762 B
Swift
//
|
|
// Options.swift
|
|
// ThreeSixtyCamera
|
|
//
|
|
// Created by Zhigang Fang on 4/18/17.
|
|
// Copyright © 2017 Tappollo Inc. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftyyJSON
|
|
|
|
protocol Option {
|
|
var key: String { get }
|
|
var value: JSON { get }
|
|
}
|
|
|
|
enum CaptureMode: String, Option {
|
|
case video = "_video"
|
|
case image = "image"
|
|
var key: String { return "captureMode" }
|
|
var value: JSON { return JSON(value: self.rawValue as NSObject) }
|
|
}
|
|
|
|
struct FileFormat: Option {
|
|
|
|
let type: String
|
|
let width: Int
|
|
let height: Int
|
|
|
|
var key: String { return "fileFormat" }
|
|
var value: JSON { return ["type": type, "width": width, "height": height] }
|
|
|
|
static let smallImage = FileFormat(type: "jpeg", width: 2048, height: 1024)
|
|
}
|