Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.39 KB

README.md

File metadata and controls

44 lines (31 loc) · 1.39 KB

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, [email protected]

License

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