Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toshi0383/videoplayer
AVPlayer control and monitoring made easy (with Rx)
https://github.com/toshi0383/videoplayer
avplayer rxswift swift
Last synced: 2 months ago
JSON representation
AVPlayer control and monitoring made easy (with Rx)
- Host: GitHub
- URL: https://github.com/toshi0383/videoplayer
- Owner: toshi0383
- Created: 2018-10-08T13:30:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T02:57:48.000Z (almost 6 years ago)
- Last Synced: 2024-10-14T09:52:54.534Z (3 months ago)
- Topics: avplayer, rxswift, swift
- Language: Swift
- Homepage:
- Size: 165 KB
- Stars: 31
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VideoPlayer
![Xcode](https://img.shields.io/badge/Xcode-10.0-brightgreen.svg)
![Swift](https://img.shields.io/badge/Swift-4.2-brightgreen.svg)AVPlayer control made easy.
![design](https://github.com/toshi0383/assets/blob/master/VideoPlayer/VideoPlayer-en.png?raw=true)
```
VideoPlayer
- VideoPlayerControl
- VideoPlayerMonitor
```# Features (Including Example only features)
work in progress
- [x] Play/Pause/Seek
- [x] Background Playback
- [x] Background AirPlay
- [x] Built-in player MonitorView for debugging
- [x] allows recording or not (defaults to no)
- [x] fundamental player state observables (e.g. rate, periodicTime, duration..)
- [x] Timed Metadata (MPEG2 transport stream only)
- [ ] any loading state observableDemo code in Example.app
- [x] In-Playlist Timed Metadata
- [ ] Cross-viewcontroller AirPlay (will be in Example soon)
- [ ] Picture-in-Picture (will be in Example soon)# Usage
## Initializing AVPlayer
Observe `VideoPlayer.player: Single` to get AVPlayer instance.See: [Example](Example/)
## Monitor and Control state
Do not write `player?.pause()` any more.
See: [Example](Example/)
## Encrypted contents
`VideoPlayerFactory` initializer accepts `AVAssetResourceLoaderDelegate`.
Set your instance which handles `EXT-X-KEY` methods.## Handling Errors
TBDSee: [Example](Example/)
## Testing
See: [VideoPlayerTests](VideoPlayerTests/)
You can simulate player behavior by yourself to improve test coverage of your app.
# Build Example
1. Make sure your default `xcode-select -p` points at correct Xcode version. (Currently Xcode10.1)2. Run following
```
carthage bootstrap --platform iOS
xcodegen
```3. Open `Example.xcodeproj`
# License
MIT