Skip to content

Sotatek-ThanhTran/SwiftYouTubeFloatingPlayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

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

hanappaula, [email protected]

License

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

About

Swift floating video player like YouTube

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%