All Projects → 0xced → Xcdyoutubekit

0xced / Xcdyoutubekit

Licence: mit

Programming Languages

objective c
16641 projects - #2 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Xcdyoutubekit

Youtube Extension
🔴YouTube Extension🧰>80 Features ⭐Please document, code or donate📌Tidy📌Longest-standing(2012)(Users>350000)⋮🎞️🎛️🎧⚙️🎬🔊☕🎨🧩🧪📈⏯️(Player: Repeat Screenshot Rotate; Hide related video distraction. Always expand video Description. Playback speed. Video Quality bandwidth H.264 electricity. Player Size Full Window. Themes Customization. Statistics. Reverse Playlist YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube YouTube Youtube enhancer YouTube app YouTube video YouTube YouTube YouTube api v3 YouTube playback YouTube player VP8 VP9 AV1 vidIQ tubebuddy download adblocker adblock ads sponsorblock addon youtube music ⭐ youtube premium css css4 html5 ytdl youtube-dl invidious iridium ParticleCore youtube+ youtube++ youtube-plus maia-yt youtube nonstop youtube control center vlogger vlog h264ify h264 m.youtube.com music.youtube.com studio.youtube youtube mobile youtube studio ⭐ kids Vanced gaming.youtube.com gaming youtubecenter freetube lite-youtube-embed newpipe youtube-dl-gui mps-youtube nuclear pytube awesome youtubers youtube downloader 8k 4k 60fps 30fps youtubeexplode vidgear k-lite tubebuddy adobe apple ios iphone design simplify ffmpeg premiere designer annoyance youtube upload
Stars: ✭ 1,027 (-64%)
Mutual labels:  player, youtube
Vue Youtube
A simple component for a powerful API. vue-youtube provides a simple layer for you to use your imagination while over the YouTube IFrame Player API.
Stars: ✭ 261 (-90.85%)
Mutual labels:  player, youtube
Musicalyoutube
A Youtube floating PIP player for Android.
Stars: ✭ 50 (-98.25%)
Mutual labels:  player, youtube
Plyr
Plyr Mediaplayer (Video und Audio) im Front- und Backend
Stars: ✭ 30 (-98.95%)
Mutual labels:  player, youtube
Ytermplayer
Stream youtube playlists as audio on linux terminal
Stars: ✭ 235 (-91.76%)
Mutual labels:  player, youtube
Youtube Html Js Audio Player
An audio player created with HTML Audio and Javascript 🚀
Stars: ✭ 39 (-98.63%)
Mutual labels:  player, youtube
Gsap Player
A small, customizable youtube-like player for gsap timelines
Stars: ✭ 92 (-96.78%)
Mutual labels:  player, youtube
Maia Yt
Currently codenamed maia-yt is a userscript (and browser extension) that enhances the user's experience on YouTube.
Stars: ✭ 493 (-82.72%)
Mutual labels:  player, youtube
Min Vid
Popout video player in Firefox
Stars: ✭ 180 (-93.69%)
Mutual labels:  player, youtube
Shuffle
Shuffle every song in existence from YouTube
Stars: ✭ 131 (-95.41%)
Mutual labels:  player, youtube
Yt Player
Simple, robust, blazing-fast YouTube Player API
Stars: ✭ 576 (-79.81%)
Mutual labels:  player, youtube
yout
🔥 YouTube playlist player for desktop. Free, no YouTube ads, floating window. Available for Linux, Mac and Windows.
Stars: ✭ 82 (-97.13%)
Mutual labels:  player, youtube
Pip Tool
PiP tool is a software to use the Picture in Picture mode on Windows. This feature allows you to watch content (video for example) in thumbnail format on the screen while continuing to use any other software on Windows.
Stars: ✭ 572 (-79.95%)
Mutual labels:  player, youtube
Kaku
🎧 Kaku is a highly integrated music player supports different online platform like YouTube, SoundCloud, Vimeo and more. Available on Mac, Windows and Linux.
Stars: ✭ 1,028 (-63.97%)
Mutual labels:  player, youtube
React Player
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
Stars: ✭ 5,931 (+107.89%)
Mutual labels:  player, youtube
Plyr React
A simple, accessible and customisable react media player for Video, Audio, YouTube and Vimeo
Stars: ✭ 89 (-96.88%)
Mutual labels:  player, youtube
Vue Video Player
🎞 @videojs component for @vuejs
Stars: ✭ 4,026 (+41.11%)
Mutual labels:  player, youtube
Redditmusicplayer
🎵 A free and open-source streaming music web player using data from Reddit
Stars: ✭ 401 (-85.94%)
Mutual labels:  player, youtube
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (-32.42%)
Mutual labels:  player, youtube
YoutubePlayer
Play and download YouTube videos. Extract audio from video. With minimalist beautiful gui.
Stars: ✭ 19 (-99.33%)
Mutual labels:  player, youtube

About

Build Status Coverage Status Platform Pod Version Carthage Compatibility Swift Package Manager Compatibility License

XCDYouTubeKit is a YouTube video player for iOS, tvOS and macOS.

Are you enjoying XCDYouTubeKit? You can say thank you with a tweet. I am also accepting donations. ;-)

Donate button

Requirements

  • Runs on iOS 8.0 and later
  • Runs on macOS 10.9 and later
  • Runs on tvOS 9.0 and later

Warning

XCDYouTubeKit is against the YouTube Terms of Service. The only official way of playing a YouTube video inside an app is with a web view and the iframe player API. Unfortunately, this is very slow and quite ugly, so I wrote this player to give users a better viewing experience.

Installation

XCDYouTubeKit is available through CocoaPods, Carthage and Swift Package Manager.

CocoaPods:

pod "XCDYouTubeKit", "~> 2.15"

Carthage:

github "0xced/XCDYouTubeKit" ~> 2.15

Swift Package Manager:

Add XCDYouTubeKit to the dependencies value of your Package.swift

dependencies: [
	.package(url: "https://github.com/0xced/XCDYouTubeKit.git", from: "2.15.0")
]

Alternatively, you can manually use the provided static library or dynamic framework. In order to use the static library, you must:

  1. Create a workspace (File → New → Workspace…)
  2. Add your project to the workspace
  3. Add the XCDYouTubeKit project to the workspace
  4. Drag and drop the libXCDYouTubeKit.a file referenced from XCDYouTubeKit → Products → libXCDYouTubeKit.a into the Link Binary With Libraries build phase of your app’s target.

These steps will ensure that #import <XCDYouTubeKit/XCDYouTubeKit.h> will work properly in your project.

Usage

XCDYouTubeKit is fully documented.

iOS 8.0+ & tvOS (AVPlayerViewController)

AVPlayerViewController *playerViewController = [AVPlayerViewController new];
[self presentViewController:playerViewController animated:YES completion:nil];

__weak AVPlayerViewController *weakPlayerViewController = playerViewController;
[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:videoIdentifier completionHandler:^(XCDYouTubeVideo * _Nullable video, NSError * _Nullable error) {
    if (video)
    {
        NSDictionary *streamURLs = video.streamURLs;
        NSURL *streamURL = streamURLs[XCDYouTubeVideoQualityHTTPLiveStreaming] ?: streamURLs[@(XCDYouTubeVideoQualityHD720)] ?: streamURLs[@(XCDYouTubeVideoQualityMedium360)] ?: streamURLs[@(XCDYouTubeVideoQualitySmall240)];
        weakPlayerViewController.player = [AVPlayer playerWithURL:streamURL];
        [weakPlayerViewController.player play];
    }
    else
    {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}];

iOS, tvOS and macOS

NSString *videoIdentifier = @"9bZkp7q19f0"; // A 11 characters YouTube video identifier
[[XCDYouTubeClient defaultClient] getVideoWithIdentifier:videoIdentifier completionHandler:^(XCDYouTubeVideo *video, NSError *error) {
	if (video)
	{
		// Do something with the `video` object
	}
	else
	{
		// Handle error
	}
}];

iOS 8.0

On iOS, you can use the class XCDYouTubeVideoPlayerViewController the same way you use a MPMoviePlayerViewController, except you initialize it with a YouTube video identifier instead of a content URL.

Present the video in full-screen

- (void) playVideo
{
	XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"];
	[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:videoPlayerViewController.moviePlayer];
	[self presentMoviePlayerViewControllerAnimated:videoPlayerViewController];
}

- (void) moviePlayerPlaybackDidFinish:(NSNotification *)notification
{
	[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:notification.object];
	MPMovieFinishReason finishReason = [notification.userInfo[MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] integerValue];
	if (finishReason == MPMovieFinishReasonPlaybackError)
	{
		NSError *error = notification.userInfo[XCDMoviePlayerPlaybackDidFinishErrorUserInfoKey];
		// Handle error
	}
}

Present the video in a non full-screen view

XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"];
[videoPlayerViewController presentInView:self.videoContainerView];
[videoPlayerViewController.moviePlayer play];

See the demo project for more sample code.

Logging

Since version 2.2.0, XCDYouTubeKit produces logs. XCDYouTubeKit supports CocoaLumberjack but does not require it.

See the XCDYouTubeLogger class documentation for more information.

Credits

The URL extraction algorithms in XCDYouTubeKit are inspired by the YouTube extractor module of the youtube-dl project.

Contact

Cédric Luthi

License

XCDYouTubeKit is available under the MIT license. See the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].