forked from AgoraIO/API-Examples
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathConfigs.swift
More file actions
35 lines (32 loc) · 764 Bytes
/
Configs.swift
File metadata and controls
35 lines (32 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// Configs.swift
// APIExample
//
// Created by 张乾泽 on 2020/8/29.
// Copyright © 2020 Agora Corp. All rights reserved.
//
import Foundation
struct Resolution {
var width: Int
var height: Int
func name() -> String {
return "\(width)x\(height)"
}
func size() -> CGSize {
return CGSize(width: width, height: height)
}
}
class Configs {
static var defaultResolutionIdx: Int = 2
static var Resolutions:[Resolution] = [
Resolution(width: 320, height: 240),
Resolution(width: 640, height: 480),
Resolution(width: 960, height: 720),
Resolution(width: 1920, height: 1080)
]
static var defaultFpsIdx: Int = 1
static var Fps:[Int] = [
15,
30
]
}