1. 导入头文件  

#import <MediaPlayer/MediaPlayer.h>

方式一:MPMoviePlayerController
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"笑傲江湖——东方不败外传_高清" withExtension:@"mp4"];
    
    _mvPlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
    
    [_mvPlayer prepareToPlay];
    
    _mvPlayer.view.frame = CGRectMake(0, 100, 375, 568);
    
    [self.view addSubview:_mvPlayer.view];

方式二:MPMoviePlayerViewController

    NSURL *url = [[NSBundle mainBundle] URLForResource:@"笑傲江湖——东方不败外传_高清" withExtension:@"mp4"];
    MPMoviePlayerViewController *player = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
    
    // 设置模态显示过度效果
    player.modalTransitionStyle = 
    UIModalTransitionStyleCrossDissolve;
    
    // 以模态方式显示视频界面
    [self presentMoviePlayerViewControllerAnimated:player];

 

流媒体测试网站:

http://live.3gv.ifeng.com/live/hongkong.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819/nexttvnews_hls/StreamEdge.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819-b/nexttvnews_hls/StreamEdge.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819/nexttvnews_hls/StreamMobLow.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819-b/nexttvnews_hls/StreamMobLow.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819/nexttvnews_hls/StreamMobHigh.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819-b/nexttvnews_hls/StreamMobHigh.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819/nexttvnews_hls/StreamWifi.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819-b/nexttvnews_hls/StreamWifi.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819/nexttvnews_hls/StreamEdgeaudio.m3u8

http://nexttvnews_hls-i.akamaihd.net/hls/live/215819-b/nexttvnews_hls/StreamEdgeaudio.m3u8

 


􏱪􏱫􏱬􏳎􏲆 􏳗􏱅􏱯􏳌􏰞􏱪􏳘􏱮􏲩􏱁

  􏰰􏱘􏱲􏰝􏲨􏳙􏱯􏳚􏳛􏱳􏳜􏳝􏲺􏲻􏰰􏱘􏰀􏰁
  􏱑􏰰􏳞􏲚􏰌􏰍
  􏰓􏰵􏰶􏳟􏳠􏰌􏰍􏰳􏳞􏳡􏱑􏰗􏱤􏲢
  􏰓􏰵􏰶􏳢􏳣􏰌􏰍􏱯􏲚􏰟􏰛􏳤􏰹􏰌􏰍􏰟􏰚􏱑􏰰
posted on 2015-10-10 09:12  怡情_老二  阅读(301)  评论(0)    收藏  举报