Config
public struct Config
Danmaku Configurations.
-
Color of the danamku.
Declaration
Swift
public let color: Int
-
Font size of the danmaku.
Declaration
Swift
public let fontSize: FontSize
-
Mode of the danamaku.
Declaration
Swift
public let mode: Mode
-
Pool for the danmaku to post to.
Declaration
Swift
public let pool: Pool
-
Default configuration.
Declaration
Swift
public static let `default` = Config()
-
Initialize a configuration for danmaku.
Declaration
Parameters
color
color of the danmaku.
fontSize
font size of the danmaku.
mode
mode of the danmaku.
pool
pool for the danmaku to post to.
-
Mode/Type of the danmaku.
- normal: 滚动弹幕 (rolling) on bilibili.
- bottom: 底部弹幕 on bilibili.
- top: 顶部弹幕 on bilibili.
- reversed: 逆向弹幕 on bilibili.
- special: 特殊弹幕 on bilibili.
- code: 代码弹幕 on bilibili.
- bas: bilibili animation script.
Declaration
Swift
public enum Mode: Int
-
Pool for the danmaku to post to.
- normal: 普通弹幕 on bilibili.
- subtitle: requires the emitter must own the video. 字幕弹幕(要求发送者拥有视频的所有权)on bilibili.
- special: 特殊弹幕 on bilibili.
Declaration
Swift
public enum Pool: Int
-
Wrapper for font size of the danmaku.
- small:
小
on bilibili. - medium:
中
on bilibili. - large:
大
on bilibili. - custom: Some user defined value.
- FontSize.small.rawValue:: 18.
- FontSize.medium.rawValue:: 25.
- FontSize.large.rawValue:: 36.
Declaration
Swift
public enum FontSize: RawRepresentable
- small: