Difference between revisions of "VLCKit"
m (→Sample code) |
|||
Line 34: | Line 34: | ||
<code>Examples_OSX</code> includes 3 different projects. | <code>Examples_OSX</code> includes 3 different projects. | ||
* ''BasicPlayerWithPlaylist'': this sum's it up pretty well. drag and drop files, hit play / pause, see them play in the same window in the order you want them to. | * ''BasicPlayerWithPlaylist'': this sum's it up pretty well. drag and drop files, hit play / pause, see them play in the same window in the order you want them to. | ||
+ | [[File:List based vlckit player sample.png|thumbnail|center|Basic Player with Playlist]] | ||
* ''FlashVideoDownloader'': this exemplifies the basics on how to deploy VLC's URL parsing mechanisms to gain access to the actually played media and how to store it. | * ''FlashVideoDownloader'': this exemplifies the basics on how to deploy VLC's URL parsing mechanisms to gain access to the actually played media and how to store it. | ||
+ | [[File:Flash video downloader vlckit sample project.png|thumbnail|center|Flash Video Downloader]] | ||
* ''iPodConverter'': VLCKit includes streaming and transcoding features including a few pre-defined profiles. In this sample, you see how to use them. Drop a file in the designated area. Hit convert. See the file being converted including a progress bar. | * ''iPodConverter'': VLCKit includes streaming and transcoding features including a few pre-defined profiles. In this sample, you see how to use them. Drop a file in the designated area. Hit convert. See the file being converted including a progress bar. | ||
+ | [[File:Convert for ipad osx sample project.png|thumbnail|center|iPodConverter]] | ||
<code>Examples_iOS</code> includes 2 different projects developed using Xcode 5 and with iOS 7 in mind. With minor modifications, they will also work on iOS 5 and 6. | <code>Examples_iOS</code> includes 2 different projects developed using Xcode 5 and with iOS 7 in mind. With minor modifications, they will also work on iOS 5 and 6. |
Revision as of 12:48, 21 November 2013
This page provides a brief overview on the LibVLC binding for Objective-C.
Contents
Introduction
VLCKit is an Objective-C wrapper for libvlc's external interface, on Mac OS X and iOS.
It includes basic classes for playlists, streaming and transcoding. However, this is only a limited set. Doing simple media players (comparable to QuickTime Player or MPlayer OS X) is as hard as doing a QuickTime-based one; thus, it is really easy. However, you'll lack most of the cool things such as running multiple interfaces within one instance (remember that hotkeys is an interface, too). Still, you get da überfeature: playing multiple streams within one instance of VLC side by side.
Build the framework
- Clone git://git.videolan.org/vlc-bindings/VLCKit.git
- open
.VLCKit.xcodeproj
- make sure the VLCKit target is selected
- build the project
This should automatically build VLC itself.
Basic usage in your application
The code should speak by itself
// Set up a videoView by hand. You can also do that in the nib file videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]]; [[window contentView] addSubview:videoView]; [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable]; // Init the player object player = [[VLCMediaPlayer alloc] initWithVideoView:videoView]; [player setMedia:[VLCMedia mediaWithPath:@"/to/my/movie"]]; [player play];
Sample code
We offer sample code both for iOS and OS X.
Examples_OSX
includes 3 different projects.
- BasicPlayerWithPlaylist: this sum's it up pretty well. drag and drop files, hit play / pause, see them play in the same window in the order you want them to.
- FlashVideoDownloader: this exemplifies the basics on how to deploy VLC's URL parsing mechanisms to gain access to the actually played media and how to store it.
- iPodConverter: VLCKit includes streaming and transcoding features including a few pre-defined profiles. In this sample, you see how to use them. Drop a file in the designated area. Hit convert. See the file being converted including a progress bar.
Examples_iOS
includes 2 different projects developed using Xcode 5 and with iOS 7 in mind. With minor modifications, they will also work on iOS 5 and 6.
- SimplePlayback: it's as simple as it sounds. Launch the app to watch a file being streamed live over http from one of our servers to your iOS Simulator or device.
- DropIn-Player: this is a more advanced sample project implementing a basic view controller, which could be embedded in your own app. It allows any kind of media playback, subtitles handling, multiple audio track handling, aspect ratio customizations, playback position manipulation and display, volume. All of that, implemented in a self-contained class and a single xib file.
What applications use VLCKit?
- iMagneto
- Lunettes by the VideoLAN team
- VLC for iOS by the VideoLAN team
Feel free to add your application above in alphabetical order.