Latest 1.0.0
Homepage https://github.com/longhoang2984/LHVideoDetailController
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform

Example

LHVideoDetailController like Facebook Video and Youtube app, LHVideoDetailController allows you to play videos on a floating mini window at the bottom of your screen from sites like YouTube, Vimeo & Facebook or custom video , yes you have to prepare your video view for that.

The controller extend from https://github.com/entotsu/DraggableFloatingViewController

How it works
The view will animate the view just like Youtube mobile app, while tapping on video a UIView pops up from right corner of the screen and the view can be dragged to right corner through Pan Gesture and more features are there as Youtube iOS app

Screenshot

Demo

Usage

Requirements

XCode 9+

Swift 4+

Installation

Cocoapods

$ pod repo update

And add this to your Podfile:

pod 'LHVideoDetailController'

and

$ pod install

extend this class

set your video view in "viewDidLoad" of subclass

override func viewDidLoad() {

self.setupViewsWithVideoView(yourMoivePlayer.view, //UIView
videoViewHeight: yourPlayerHeight, //CGFloat
minimizeButton: yourButton //UIButton
)

// add your view to bodyView
self.bodyView.addSubview(yourView)
}

in parent view controller

show

func showSecondController() {
removeDraggableFloatingViewController()
self.videoViewController = VideoDetailViewController()
self.videoViewController.delegate = self
self.videoViewController.showVideoViewControllerOnParentVC(self)
}

dismiss

func removeDraggableFloatingViewController() {
if self.videoViewController != nil {
self.videoViewController.removeAllViews()
self.videoViewController = nil
}
}

Please edit "info.plist"

To disable swipe down gesture of Notification Center, you need to edit "info.plist" to hide status bar.
http://stackoverflow.com/questions/18059703/cannot-hide-status-bar-in-ios7
editInfoPlist




please override if you want

override func didExpand() {
showVideoControl()
}
override func didMinimize() {
hideVideoControl()
}

Author

Long Hoàng, [email protected]

License

LHVideoDetailController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LHVideoDetailController",
    "version": "1.0.0",
    "summary": "LHVideoDetailController like play video screen of facebook and youtube app",
    "description": "TODO: LHVideoDetailController like play video screen of facebook and youtube app, LHVideoDetailController allows you to play videos on a floating mini window at the bottom of your screen from sites like YouTube, Vimeo & Facebook or custom video , yes you have to prepare your video view for that.nnThe controller extend from https://github.com/entotsu/DraggableFloatingViewControllernnHow it works The view will animate the view just like Youtube mobile app, while tapping on video a UIView pops up from right corner of the screen and the view can be dragged to right corner through Pan Gesture and more features are there as Youtube iOS app",
    "homepage": "https://github.com/longhoang2984/LHVideoDetailController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Long Hoau0300ng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/longhoang2984/LHVideoDetailController.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source_files": "LHVideoDetailController/**/*.swift",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This