【发布时间】:2014-12-18 05:59:56
【问题描述】:
我正在使用适用于 iOS 的 Brighcove SDK 播放一些视频。播放视频的基本设置是(基于 Brightcove 指南):
@interface VideoPlayerViewController()
@property (strong, nonatomic) id <BCOVPlaybackController> videoController;
@end
@implementation VideoPlayerViewController
-(void)viewDidLoad {
// create an array of videos
NSArray *videos = @[
[self videoWithURL:[NSURL URLWithString:@"http://cf9c36303a9981e3e8cc-31a5eb2af178214dc2ca6ce50f208bb5.r97.cf1.rackcdn.com/bigger_badminton_600.mp4"]],
[self videoWithURL:[NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"]]
];
// add the playback controller
self.controller = [[BCOVPlayerSDKManager sharedManager] createPlaybackControllerWithViewStrategy:[self viewStrategy]];
self.controller.view.frame = self.view.bounds;
// create a playback controller delegate
self.controller.delegate = self;
self.controller.view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
// add the controller view as a subview of the SVPViewController's view
[self.view addSubview:self.controller.view];
// turn on auto-advance
self.controller.autoAdvance = YES;
// turn on auto-play
self.controller.autoPlay = YES;
// add the video array to the controller's playback queue
[self.controller setVideos:videos];
// play the first video
[self.controller play];
}
@end
如何设置视频的初始时间?我已阅读 SDK 文档,但没有找到任何属性或方法。
【问题讨论】:
标签: ios video sdk brightcove