Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexruperez/avplayeritemhomeoutput
Coordinate the output of content associated with your HomeKit lightbulbs. #Ambilight
https://github.com/alexruperez/avplayeritemhomeoutput
ambilight avfoundation avkit avplayer avplayeritem avplayeritemoutput avplayeritemvideooutput avplayerview avplayerviewcontroller homebridge homebridge-plugin homekit internet-of-things iot library lightbulbs output swift
Last synced: 1 day ago
JSON representation
Coordinate the output of content associated with your HomeKit lightbulbs. #Ambilight
- Host: GitHub
- URL: https://github.com/alexruperez/avplayeritemhomeoutput
- Owner: alexruperez
- License: mit
- Created: 2017-05-15T14:03:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-16T19:01:14.000Z (over 7 years ago)
- Last Synced: 2025-02-01T19:45:44.313Z (1 day ago)
- Topics: ambilight, avfoundation, avkit, avplayer, avplayeritem, avplayeritemoutput, avplayeritemvideooutput, avplayerview, avplayerviewcontroller, homebridge, homebridge-plugin, homekit, internet-of-things, iot, library, lightbulbs, output, swift
- Language: Swift
- Size: 10.6 MB
- Stars: 39
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# AVPlayerItemHomeOutput
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/alexruperez)
[![Version](https://img.shields.io/cocoapods/v/AVPlayerItemHomeOutput.svg?style=flat)](http://cocoapods.org/pods/AVPlayerItemHomeOutput)
[![License](https://img.shields.io/cocoapods/l/AVPlayerItemHomeOutput.svg?style=flat)](http://cocoapods.org/pods/AVPlayerItemHomeOutput)
[![Platform](https://img.shields.io/cocoapods/p/AVPlayerItemHomeOutput.svg?style=flat)](http://cocoapods.org/pods/AVPlayerItemHomeOutput)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager Compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)
[![Build Status](https://travis-ci.org/alexruperez/AVPlayerItemHomeOutput.svg?branch=master)](https://travis-ci.org/alexruperez/AVPlayerItemHomeOutput)
[![Code Coverage](https://codecov.io/gh/alexruperez/AVPlayerItemHomeOutput/branch/master/graph/badge.svg)](https://codecov.io/gh/alexruperez/AVPlayerItemHomeOutput)
[![codebeat badge](https://codebeat.co/badges/f724bedf-023f-45a0-b854-d2e864561f7a)](https://codebeat.co/projects/github-com-alexruperez-avplayeritemhomeoutput-master)![*AVPlayerItemHomeOutput*](https://raw.githubusercontent.com/alexruperez/AVPlayerItemHomeOutput/master/AVPlayerItemHomeOutput.jpg)
The *AVPlayerItemHomeOutput* lets you coordinate the output of content associated with your [*HomeKit*](https://www.apple.com/shop/accessories/all-accessories/homekit) lightbulbs.
In other words, becomes [*#Ambilight*](https://en.wikipedia.org/wiki/Ambilight). 😀
Works with all [*HomeKit*](https://developer.apple.com/homekit) (and [*HomeBridge*](https://github.com/nfarina/homebridge)) compatible lightbulbs.
![*AVPlayerItemHomeOutput*](https://raw.githubusercontent.com/alexruperez/AVPlayerItemHomeOutput/master/AVPlayerItemHomeOutput.gif)
## Installation
AVPlayerItemHomeOutput is available through [*CocoaPods*](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'AVPlayerItemHomeOutput'
```#### Or you can install it with [*Carthage*](https://github.com/Carthage/Carthage):
```ogdl
github "alexruperez/AVPlayerItemHomeOutput"
```#### Or install it with [*Swift Package Manager*](https://swift.org/package-manager/):
```swift
dependencies: [
.Package(url: "https://github.com/alexruperez/AVPlayerItemHomeOutput.git")
]
```## Usage
```swift
let sample = URL(string: "https://raw.githubusercontent.com/bower-media-samples/big-buck-bunny-1080p-30s/master/video.mp4")!
let asset = AVAsset(url: sample)
let playerItem = AVPlayerItem(asset: asset)
let homeOutput = AVPlayerItemHomeOutput(playerItem) // Only create your instance...
homeOutput.setDelegate(self, queue: nil) // Optional AVPlayerItemOutputPullDelegate.
playerItem.add(homeOutput) // ...and add it to your AVPlayerItem!
let playerViewController = AVPlayerViewController()
playerViewController.player = AVPlayer(playerItem: playerItem)
present(playerViewController, animated: true) {
playerViewController.player?.play()
}
```#### Don't forget:
Add *NSHomeKitUsageDescription* key to your *Info.plist* to specify the use of HomeKit in your app.
## Etc.
* Contributions are very welcome.
* Attribution is appreciated (let's spread the word!), but not mandatory.## Authors
[alexruperez](https://github.com/alexruperez), [email protected]
## License
*AVPlayerItemHomeOutput* is available under the MIT license. See the LICENSE file for more info.