forked from libobjc/SGPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
122 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// SGVideoItem.h | ||
// demo-common | ||
// | ||
// Created by Single on 2017/3/15. | ||
// Copyright © 2017年 single. All rights reserved. | ||
// | ||
|
||
#import <SGPlayer/SGPlayer.h> | ||
|
||
@interface SGVideoItem : NSObject | ||
|
||
@property (nonatomic, copy) NSString *name; | ||
@property (nonatomic, copy) SGAsset *asset; | ||
@property (nonatomic) SGDisplayMode displayMode; | ||
|
||
+ (NSArray<SGVideoItem *> *)videoItems; | ||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// SGVideoItem.m | ||
// demo-common | ||
// | ||
// Created by Single on 2017/3/15. | ||
// Copyright © 2017年 single. All rights reserved. | ||
// | ||
|
||
#import "SGVideoItem.h" | ||
|
||
@implementation SGVideoItem | ||
|
||
+ (NSArray<SGVideoItem *> *)videoItems | ||
{ | ||
NSURL *i_see_fire = [[NSBundle mainBundle] URLForResource:@"i-see-fire" withExtension:@"mp4"]; | ||
NSURL *google_help_vr = [[NSBundle mainBundle] URLForResource:@"google-help-vr" withExtension:@"mp4"]; | ||
|
||
NSMutableArray *items = [NSMutableArray array]; | ||
{ | ||
SGVideoItem *item = [[SGVideoItem alloc] init]; | ||
item.name = @"I See Fire"; | ||
item.asset = [[SGURLAsset alloc] initWithURL:i_see_fire]; | ||
item.displayMode = SGDisplayModePlane; | ||
[items addObject:item]; | ||
} | ||
{ | ||
SGVideoItem *item = [[SGVideoItem alloc] init]; | ||
item.name = @"Google Help VR"; | ||
item.asset = [[SGURLAsset alloc] initWithURL:google_help_vr]; | ||
item.displayMode = SGDisplayModeVR; | ||
[items addObject:item]; | ||
} | ||
//rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov | ||
//http://ivi.bupt.edu.cn/hls/cctv5phd.m3u8 | ||
//rtmp://live.hkstv.hk.lxdns.com/live/hks1 | ||
return items; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,5 @@ | |
|
||
@property (strong, nonatomic) UIWindow *window; | ||
|
||
|
||
@end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters