GithubHelp home page GithubHelp logo

sahin / videosplashkit Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 137.0 4.44 MB

VideoSplashKit - UIViewController library for creating easy intro pages with background videos

License: MIT License

Ruby 8.41% Swift 91.59%

videosplashkit's Introduction

Build Status Gitter Gitter CocoaPods

VideoSplashKit - Video based UIViewController

alt tag

Introduction

Requires iOS 8 or later and Xcode 6.1+
Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.

Installation

To install via CocoaPods add this line to your Podfile.

use_frameworks!

and

pod 'VideoSplashKit'

or if you are using Swift4

pod 'VideoSplashKit', :git => 'https://github.com/svtek/VideoSplashKit/VideoSplashKit.git', :branch => 'swift4'

Then, run the following command:

$ pod install

Usage

import VideoSplashKit

class ViewController: VideoSplashViewController {

  override func viewDidLoad() {
    super.viewDidLoad()
    let url = NSURL.fileURLWithPath(NSBundle.mainBundle().pathForResource("test", ofType: "mp4")!)
    self.videoFrame = view.frame
    self.fillMode = .ResizeAspectFill
    self.alwaysRepeat = true
    self.sound = true
    self.startTime = 12.0
    self.duration = 4.0
    self.alpha = 0.7
    self.backgroundColor = UIColor.blackColor()
    self.contentURL = url
    self.restartForeground = true
  }
}

Authors

Omer Karisman

Lead UI/UX @ MojiLaLa
Twitter Dribble Github
Sahin Boydas

Co-Founder @ MojiLaLa
LinkedIn

videosplashkit's People

Contributors

bitdeli-chef avatar cemolcay avatar dannyshmueli avatar frostover avatar furiatti avatar hemangshah avatar jyxia avatar minuscorp avatar mruvim avatar okaris avatar readmecritic avatar toygar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videosplashkit's Issues

Background Audio

Even with Audio = false the background music (music app) stop play and cant be resumed as long the app with VideoSplash is running

App craches using facebookSDK with VideoSplashKit

I Don't know why but my app is crashing because of this line of code,

        self.moviePlayer.player?.addObserver(
          self,
          forKeyPath: "status",
          options: .New,
          context: nil)

observation: when commenting this line of code, i solve the error

the problem is, i have a button that make the login with facebook, and the video in the background, using VideoSplashKit, when i make the login with facebook, we go to the facebook webview, and when going back to the app i get this error:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x13ddf3f10 of class AVPlayer was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x13f303980> (
<NSKeyValueObservance 0x13ddc01f0: Observer: 0x13dd76fd0, Key path: status, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x13df64dd0>
)'
*** First throw call stack:
(0x18269edb0 0x181d03f80 0x18269ecf8 0x182ff2d80 0x1821458e8 0x101035a3c 0x10103b4e4 0x182654d50 0x182652bb8 0x18257cc50 0x183e64088 0x187866088 0x1000b3784 0x18211a8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

Project Description

I think we could make a better description, such as:
VideoSplashKit - UIViewController library for creating easy intro pages with background videos

Audio Problem

Hello,

When I add a video file with sound I can't make that video mute.How can I do that ?

problem running example without swift lint

I simply downloaded the library to see how it looks with the airplane video, but got this message:

myderivedDatalocation/DerivedData/VideoSplash-hewgngxkasswrscufpaujewroedd/Build/Intermediates/VideoSplash.build/Debug-iphoneos/VideoSplash.build/Script-C3CEBF9F1BCCA22200CB209E.sh: line 2: /usr/local/bin/swiftlint: No such file or directory

I simply downloaded a zip, unzipped it and opened xcodeproj.

Any idea how to simply look check how this library looks like running on an iphone ?

Not working on iPad Pro simulator

Empty project with only one ViewController (empty).
VideoSplashKit Installed with CocoaPods
iPad Pro Simulator iOS 9.2 (13C75)
Xcode 7.2.1 (7C1002)

14 seconds movie works perfectly on iPad Retina, iPad 2, iPad Air 2 Simulator and on a real device iPad Air 2 (iOS 9.x)

On the iPad simulator it simply get stuck on a black screen, or gray screen if "self.alpha = 0.7"
Not yet tested on a real iPad Pro device

Video keeps playing in background

Really like VideoSplashKit and been using it for some time. Recently, I decided to change the sound to on; which pulls from a Firebase Remote Config function. All works well until I change views.

For some reason, when the user clicks a button to transition to a different ViewController the sound from the video still continues to play... Anyone know how to get the sound to stop and or the video to stop playing when I switch to a different view.

Thank you,
John

Is not releasing the device memory

Even when I finish my ViewController, the video continues to using device memory and the threads created are not finalized.

captura de tela 2016-06-30 as 06 00 54

is there any way to clear the memory that I do not know?

AVPlayer observer error

When running on ios 9 i am getting an error, an instance 0x7fd8f1395bb0 of class AVPlayer was deallocated while key value observers were still registered with it.
This happens after the view controller has gone out of focus and another view controller is presented.

Video freeze

On iOS 9, when you open the app, the video loads normally, if you click on the home and then reopen the app, the video freezes

Swift 2.0 Support

Hello
What are the plans for supporting Swift 2.0 in the future? They changed quite a lot in the new specification, and this framework makes it impossible to build an app in iOS 9 and XCode 7

VideoSplashKit stop user music

When my app opens the controller with VideoSplashKit, the users music stops, its a doubt a have to handle for background music, or VideoSplashKit doesn't support that?

Thank you!

Carthage Support

Any chance of adding support for Carthage?

Dependency "VideoSplashKit" has no shared framework schemes

Product > Edit Scheme (shared scheme) then verify if in git. Not sure about other requirements. Adding everything under a Sources file will also help make this compatible for Swift Package Manager in Swift 3.

Resume from Background freezes video playing

Hi, thank you for this wonderful contribution. I hit a problem. When the app goes into background and comes back active, the video stop. Are they methods to call to start and stop the video?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.