Latest 0.1.5
Homepage https://github.com/itribs/RBPlayer
License MIT
Platforms ios 7.0
Authors

Build Status
CocoaPods Compatible
Platform

RBPlayer

Some of the advance features are:

  • Fully customizable UI
  • No view-level restrictions (have it any size and position you would like!)
  • Supports HTTP Live Streaming protocol
  • Orientation change support (even when orientation lock is enabled)

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 7.0 or later

Installation

RBPlayer is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "RBPlayer", "~> 0.1.5"

Getting Start

RBPlayerViewController *viewController = [[RBPlayerViewController alloc] init];
[viewController.player playWithURL:[NSURL URLWithString:@"http://xxx.xxx/xx.mp4"]];
[self presentViewController:viewController animated:YES completion:nil];

Play

RBPlayerItem *item = [[RBPlayerItem alloc] init];
item.title = @"这都是什么jb电影";
item.assetTitle = @"清晰";

RBPlayerItemAsset *itemAsset1 = [[RBPlayerItemAsset alloc] initWithType:@"清晰" URL:[NSURL URLWithString:url]];
RBPlayerItemAsset *itemAsset2 = [[RBPlayerItemAsset alloc] initWithType: @"高清" URL:[NSURL URLWithString:url]];

item.assets = @[itemAsset1, itemAsset2];

[self.player replaceCurrentItemWithPlayerItem:item];
[self.player playWithItemAsset:itemAsset1];

Customize

self.player = [[RBVideoPlayer alloc] init];
[self.view addSubview:self.player.view];

self.player.view.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-20-[playerView]-50-|" options:0 metrics:nil views:@{@"playerView":self.player.view}]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-50-[playerView(200)]" options:0 metrics:nil views:@{@"playerView":self.player.view}]];

Author

Ribs, [email protected]

License

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

Latest podspec

{
    "name": "RBPlayer",
    "version": "0.1.5",
    "summary": "customizable Video Player, based on AVPlayer.",
    "description": "* Fully customizable UIn* No view-level restrictions (have it any size and position you would like!)n* Supports HTTP Live Streaming protocoln* Orientation change support (even when orientation lock is enabled)",
    "homepage": "https://github.com/itribs/RBPlayer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ribs": "[email protected]"
    },
    "source": {
        "git": "https://github.com/itribs/RBPlayer.git",
        "tag": "0.1.5"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "RBPlayer/Classes/**/*",
    "resource_bundles": {
        "RBPlayer": [
            "RBPlayer/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This