Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mruvim/videobackground
Lightweight view to display background video
https://github.com/mruvim/videobackground
ios swift xcode
Last synced: 23 days ago
JSON representation
Lightweight view to display background video
- Host: GitHub
- URL: https://github.com/mruvim/videobackground
- Owner: mruvim
- License: mit
- Created: 2017-02-16T21:21:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T05:45:47.000Z (over 5 years ago)
- Last Synced: 2024-04-25T13:21:30.022Z (7 months ago)
- Topics: ios, swift, xcode
- Language: Swift
- Homepage:
- Size: 72.2 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VideoBackground
Lightweight video view[![Version](https://img.shields.io/cocoapods/v/VideoBackground.svg?style=flat)](http://cocoapods.org/pods/VideoBackground)
[![License](https://img.shields.io/cocoapods/l/VideoBackground.svg?style=flat)](http://cocoapods.org/pods/VideoBackground)
[![Platform](https://img.shields.io/cocoapods/p/VideoBackground.svg?style=flat)](http://cocoapods.org/pods/VideoBackground)![VideoBackground](http://codingroup.com/assets/external/video-background.gif)
## Installation
####CocoaPods:
Add `pod 'VideoBackground', '~> 0.2.0'` to Podfile and run `$ pod install`####Manual:
Add files from `VideoBackground/Classes/*` to your project##How to use it
Import VideoBackground where you plan to use it then add VideoBackground as subview
```
let videoPath = Bundle.main.path(forResource: "videoFile", ofType: "mov")
let imagePath = Bundle.main.path(forResource: "videoFirstFrame", ofType: "jpg")
let options = VideoOptions(pathToVideo: videoPath, pathToImage: imagePath, isMuted: true, shouldLoop: true)
let videoView = VideoBackground(frame: view.frame, options: options)
view.addSubview(videoView)
```While video is loading image is displayed, when video is ready views crossfade. To try sample project run `pod try VideoBackground` in terminal
## Requirements
Swift 4.2
Compatible with `iOS 11+`
##Contribution
Found a bug? Please create an [issue](https://github.com/mruvim/VideoBackground/issues)
Pull requests are welcome## Contact
Ruvim Miksanskiy
![Email](http://codingroup.com/assets/external/email-icon.png)## License (MIT)
Copyright (c) 2017 - Ruvim Miksanksiy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.