Latest 1.0.5
Homepage https://github.com/90candy/YWIjkplayer
License MIT
Platforms ios 9.0, requires ARC
Dependencies SDWebImage
Frameworks UIKit, Foundation, MediaPlayer, CoreAudio, AudioToolbox, Accelerate, QuartzCore, OpenGLES, AVFoundation, CoreVideo, AVKit, CoreMedia, VideoToolbox, CoreTelephony
Authors

YWIjkPlayer

基于ijkplayer的播放器,支持RMTP、网络视频、本地视频等

3分钟快速集成播放器

一、使用 Pod 导入方式

1、在podfile文件中添加,然后执行 pod install操作,由于使用的 IJKMediaFramework.framework 较大,请耐心等待

pod 'YWIjkplayer', '~> 1.0.4'

2、AppDelegate.h 文件中加入 fullScreen 属性,如下

#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic) BOOL fullScreen;

@end

3、在 AppDelegate.m 文件中 加入横屏方法(无需调用)

- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    if (self.fullScreen == YES) {
        return UIInterfaceOrientationMaskAll;
    }
    return UIInterfaceOrientationMaskPortrait;
}

4、照着BasePlayerViewController文件中的方式去使用即可

// 这里的SecondViewController是继承了BasePlayerViewController
#import "SecondViewController.h"
@interface SecondViewController ()
@end
@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    self.isLiveVideo = YES; // 设置为直播
    [self.view addSubview:self.playerView];
    NSString *mvUrl = @"http://dlhls.cdn.zhanqi.tv/zqlive/49427_jmACJ.m3u8";
    [self showPlayerViewWithUrl:mvUrl Title:@"三国"];
    // 自动播放
    [self autoPlay];
}

@end

二、手动拖拽到项目方式

完善中

Latest podspec

{
    "name": "YWIjkplayer",
    "version": "1.0.5",
    "summary": "u57fau4e8eijkplayeru7684u64adu653eu5668,u652fu6301RMTPu3001u7f51u7edcu89c6u9891u3001u672cu5730u89c6u9891u7b49u7b49",
    "description": "u57fau4e8eijkplayeru7684u64adu653eu5668,u53efu64adRMTPu3001u7f51u7edcu89c6u9891u3001u672cu5730u89c6u9891u7b49u7b49"",
    "homepage": "https://github.com/90candy/YWIjkplayer",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u963fu552fu4e0du77e5u9053": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/90candy/YWIjkplayer.git",
        "tag": "1.0.5"
    },
    "source_files": "YWIjkplayer/YWMadiaPlayer/*.{h,m}",
    "resources": "YWIjkplayer/YWMadiaPlayer/Resources/*.png",
    "requires_arc": true,
    "dependencies": {
        "SDWebImage": [
            ">=4.2.3"
        ]
    },
    "social_media_url": "https://www.jianshu.com/u/0f7d26d766f4",
    "vendored_frameworks": "YWIjkplayer/YWIjkplayer/IJKMediaFramework.framework",
    "libraries": [
        "c++",
        "z",
        "bz2"
    ],
    "frameworks": [
        "UIKit",
        "Foundation",
        "MediaPlayer",
        "CoreAudio",
        "AudioToolbox",
        "Accelerate",
        "QuartzCore",
        "OpenGLES",
        "AVFoundation",
        "CoreVideo",
        "AVKit",
        "CoreMedia",
        "VideoToolbox",
        "CoreTelephony"
    ]
}

Pin It on Pinterest

Share This