ghostwolf90 / SwiftYouTubeFloatingPlayer

Swift floating video player like YouTube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YouTubePlayerSwift

A Swift floating/draggable player like YouTube that remains on top of all screens until it's removed. Based on PlayerView and DraggableYoutubeFloatingVideo.

Requirements

Currently YTF view is only supported on applications supporting only portrait orientations. To implement that you must put this in your AppDelegate:

func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> UIInterfaceOrientationMask {
    return UIInterfaceOrientationMask.Portrait
}

Screen Cast

SwiftYouTubeFloatingPlayer

Installation

Copy Classes and Resources folders to your project.

Usage

Pass a NSURL or [NSURL], customize the tableView on YTF view adopting delegate and dataSource in your ViewController before passing them as parameters and also provide a nib for cell customization:

YTFPlayer.initYTF(urls, tableCellNibName: "MyCell", delegate: self, dataSource: self)

Show YTF view passing a ViewController:

YTFPlayer.showYTFView(self)

Remove YTF view animated(true) or not(false):

YTFPlayer.finishYTFView(true)

Author

souana, apso0101@gmail.com

License

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

About

Swift floating video player like YouTube


Languages

Language:Swift 100.0%