AVFoundationCombine

0.0.3

Combine extensions for AVFoundation
jozsef-vesza/AVFoundation-Combine

What's New

0.0.3

2021-05-04T07:32:41Z

Adds Publisher extensions to reduce the amount of boilerplate required to retrieve common metadata properties.

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.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Mar 13 2024 20:57:22 GMT-0900 (Hawaii-Aleutian Daylight Time)