Skip to content

Commit

Permalink
Test commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroOnet committed Dec 6, 2023
1 parent 92e7ec8 commit 6354e33
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 2 deletions.
153 changes: 153 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,159 @@ github "ZeroOnet/ZonPlayer" ~> 1.0.0

ZeroOnet, zeroonetworkspace@gmail.com

# Blogs
[从头撸一个播放器 I —— ZonPlayer 需求分析及接口设计](https://zeroonet.com/2023/11/22/zonplayer-part-1/) <br>
[从头撸一个播放器 II —— 音频会话、远程控制和播放器实现](https://zeroonet.com/2023/11/24/zonplayer-part-2/) <br>
[从头撸一个播放器 III —— 缓存](https://zeroonet.com/2023/12/01/zonplayer-part-3/) <br>
[从头撸一个播放器 IV(终) —— Github Action 与组件发布](https://zeroonet.com/2023/12/05/zonplayer-part-4/)

# Main Diagram

```plantuml
@startuml
package Protocol {
Interface Sharable {
+ void share()
}
Interface Authorizable {
{static} + init(completion: Completion)
+ void send()
}
Interface Available {
{static} + bool isEnabled
{static} + bool open()
{static} + bool canHandle(url: URL)
{static} + handle(url: URL)
{static} + bool canHandle(activity: NSUserActivity)
{static} + handle(activity: NSUserActivity)
}
}
namespace Weibo {
Class Weibo implements Available {
{static} + initialize(appKey: String)
}
Class OAuth implements Authorizable {
}
Class Default implements Sharable {
{static} + init(topic: String? = nil, content: String, shareURL: URL?, image: UIImage?, completion: Completion)
{static} + init(shareText: String, image: UIImage?, completion: Completion)
}
Class Images implements Sharable {
{static} + init(topic: String? = nil, content: String, shareURL: URL, images: [UIImage], completion: Completion)
{static} + init(shareText: String, images: [UIImage], completion: Completion)
}
OAuth -[hidden]->Default
Default -[hidden]->Images
}
namespace WeChat {
Class WeChat implements Available {
{static} + initialize(appID: String, universalLink: String)
}
Class OAuth implements Authorizable {
}
Class MiniProgram {
{static} + init(userName: String, type: MiniProgramType, path: String?, completion: (Bool) -> Void)
+ void open()
}
WeChat -[hidden]> MiniProgram
namespace Session {
Class Link implements Sharable {
{static} + init(title: String, description: String, shareURL: URL, thumbImage: UIImage?, completion: Completion)
}
Class Image implements Sharable {
{static} + init(image: UIImage, completion: Completion)
}
Class MiniProgram implements Sharable {
{static} + init(title: String, description: String, image: UIImage, webPageURL: URL, path: String, userName: String, type: MiniProgramType, completion: Completion)
}
Image -[hidden]-> Link
Link -[hidden]-> MiniProgram
}
namespace Moment {
Class Link implements Sharable {
{static} + init(title: String, description: String, shareURL: URL, thumbImage: UIImage?, completion: Completion)
}
Class Image implements Sharable {
{static} + init(image: UIImage, completion: Completion)
}
}
}
WeChat.WeChat -[hidden]> WeChat.OAuth
WeChat.MiniProgram -[hidden]-> WeChat.Session
WeChat.Session -[hidden]----> WeChat.Moment
WeChat.Moment.Image -[hidden]-> WeChat.Moment.Link
namespace QQ {
Class QQ implements Available {
{static} + initialize(appID: String)
}
Class OAuth implements Authorizable {
}
namespace Default {
Class Link implements Sharable {
{static} + init(title: String, description: String, shareURL: URL, thumbImage: UIImage?, completion: Completion)
}
Class Image implements Sharable {
{static} + init(title: String, description: String, image: UIImage, completion: Completion)
}
Link -[hidden]-> Image
}
namespace Qzone {
Class Link implements Sharable {
{static} + init(title: String, description: String, shareURL: URL, thumbImage: UIImage?, completion: Completion)
}
Class Image implements Sharable {
{static} + init(title: String, images [UIImage], completion: Completion)
}
Link -[hidden]-> Image
}
}
QQ.QQ -[hidden]-> QQ.Qzone
QQ.Qzone -[hidden]---> QQ.Default
Protocol -[hidden]> Weibo
Weibo -[hidden]----> WeChat
WeChat -[hidden]-> QQ
@enduml
```plantuml
# Reference
[Alamofire](https://github.com/Alamofire/Alamofire)<br>
[Kingfisher](https://github.com/onevcat/Kingfisher)<br>
Expand Down
1 change: 0 additions & 1 deletion Sources/Usage/Cache/Streaming/ZPC+Streaming.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
extension ZPC {
/// Download during playback base on AVAssetResourceLoader.
public final class Streaming: NSObject {
public private(set) var isCancelled: Bool = false
public let source: ZPCStreamingSourceable
public init(source: ZPCStreamingSourceable = DefaultStreamingSource()) {
self.source = source
Expand Down
2 changes: 1 addition & 1 deletion Sources/Usage/Cache/Streaming/ZPCLoadingRequestable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
AVAssetResourceLoadingRequest,
AVAssetResourceLoadingDataRequest,
AVAssetResourceLoadingContentInformationRequest
cannot create a instance, so define a protocol to make unit test be available.
cannot create a instance, so define a protocol to make unit test available.
*/
public protocol ZPCLoadingRequestable: NSObject {
var isFinished: Bool { get }
Expand Down

0 comments on commit 6354e33

Please sign in to comment.