目录
目录README.md

Combine wrappers for AVPlayer

AVFoundationCombine

Combine extensions for AVFoundation

Test SPM

This project aims at providing uniformity and reducing boilerplate by providing Publisher extensions for common tasks when working with the AVFoundation framework.

For a full technical rundown and detailed explanation on this motivation and useful technical details on implementing custom Publishers, please visit https://jozsef-vesza.dev/tags/combine/

You can also check out our talk on the topic:

Custom Publishers

Installation

Swift Package Manager

Once you have a Swift package set up, adding AVFoundationCombine as a dependency can be done by adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/jozsef-vesza/AVFoundation-Combine", .upToNextMajor(from: "0.0.0"))
]

Publishers

All publishers are designed to be lazy: they only start observing properties when subscribed to.

Publisher Source
AVPlayer
playheadProgressPublisher(interval:) addPeriodicTimeObserver(forInterval:queue:using:)
currentItemPublisher() currenItem
ratePublisher() rate
AVPlayerItem
statusPublisher() status
durationPublisher() duration
isPlaybackLikelyToKeepUpPublisher() isPlaybackLikelyToKeepUp
isPlaybackBufferEmptyPublisher() isPlaybackBufferEmpty
didPlayToEndTimePublisher(_:) .AVPlayerItemDidPlayToEndTime Notification
AVAsset
commonMetadataPublisher(key:) commonMetadata
commonMetadataValuePublisher(key:) commonMetadata
commonMetadataExtrasPublisher(key:) commonMetadata
commonMetadataValuePublisher(key:as:) commonMetadata
commonMetadataValuePublisher(stringValueKey:) commonMetadata
commonMetadataArtworkPublisher() commonMetadata

License

AVFoundationCombine is available under the MIT license. See the LICENSE file for more info.

关于
403.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号