Skip to content

amirhanov/backgroundVideo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Background Controller iOS

Hello everyone ✌️

Create a beautiful video background for your application. There are two methods in this project to achieve this goal:

  • First - natively with the help of player frameworks AVPlayer and AVFoundation.
  • Second - with the help of the dependency manager Cocoa Pods.

If you like the project, do not forget to put star and follow me on GitHub:

https://github.com/amirhanov

Requirements

Swift 4+. Ready for use on iOS 9+.

Example

To run the example project, clone the repo, and run scheme from .xcodeproj. You can see tutorial for this project on YouTube.

Installation

  1. Open Terminal
  2. Run command:
cd /project path
  1. Then to install project you need run the command on Terminal:
pod install or pod update

Usage

You can use one of two options.

I. For local video:

  1. Open .xcodeproj file
  2. Import video file to project. Check the box copy if needed
  3. Open swift file ViewController
  4. Then paste the file name and format into the appropriate place:
let videoURL: NSURL = Bundle.main.url(forResource: "file name", withExtension: ".format")! as NSURL
  1. Press Command + R or Play and run project

II. For url video:

  1. Uncomment a piece of code for url in method viewDidLoad:
try? VideoBackground.shared.play(view: view, videoName: "file name", videoType: "format")
  1. Then paste the file name and format into the appropriate place
  2. In method viewDidLoad, comment out a piece of code for local video
  3. Press Command + R or Play and run project. Great!

Support

Support me with a monthly donation and help me continue activities. Become a sponsors Yandex.Money or Tinkoff Bank.

Author

Email: studio@byidole.com

https://www.youtube.com/channel/UChAjZCAZEqDSEbTAYOxGwSA?sub_confirmation=1 https://www.behance.net/amirhanov https://apps.apple.com/ru/developer/id1278605063

Licence

Available under the MIT license.

© IDOLE Studio.

About

Create background video for the application. Consider two options: first - native with the AVPlayer and AVFoundation and second - with Cocoa Pods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published