视频播放

import "ViewController.h"

import "ZSPlayerView.h"

@interface ViewController ()

@property(nonatomic,strong)ZSPlayerView *player;

@end

@implementation ViewController

  • (void)viewDidLoad {
    [super viewDidLoad];
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 50, self.view.frame.size.width, 200)];

// view.backgroundColor = [UIColor redColor];
[self.view addSubview:view];

//MARK:视频播放
NSString *str = @"http://123.126.40.109:7003/asmr/upload/1518430953135.mp4";

self.player = [[ZSPlayerView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 200) delegate:self url:str];
[self.view addSubview:self.player];

}

你可能感兴趣的:(视频播放)