Player.asset = [[SJVideoPlayerAssetCarrier alloc] initWithAssetURL:[NSURL URLWithString:@"http://....."] beginTime:10];
play on the table or collection view
Player.asset =
[[SJVideoPlayerAssetCarrier alloc] initWithAssetURL:[NSURL URLWithString:cell.model.playURLStr]
scrollView:self.tableView
indexPath:[self.tableView indexPathForCell:cell]
superviewTag:playerParentView.tag];
play on the nested table or collection view
Player.asset =
[[SJVideoPlayerAssetCarrier alloc] initWithAssetURL:playURL
indexPath:indexPath
superviewTag:playerParentView.tag
scrollViewIndexPath:embeddedScrollViewIndexPath
scrollViewTag:embeddedScrollView.tag
rootScrollView:self.tableView];
@property (nonatomic, strong, readwrite, nullable) SJVideoPlayerAssetCarrier *asset;
- (void)playWithURL:(NSURL *)playURL jumpedToTime:(NSTimeInterval)time;
@property (nonatomic, strong, readwrite, nullable) NSURL *assetURL;
- (void)playWithURL:(NSURL *)playURL;
- (UIImage *__nullable)screenshot;
- (NSTimeInterval)currentTime;
- (NSTimeInterval)totalTime;
@property (nonatomic, strong, readonly) SJPrompt *prompt;
- (void)showTitle:(NSString *)title;
- (void)showTitle:(NSString *)title duration:(NSTimeInterval)duration;
- (void)hiddenTitle;
@property (nonatomic, assign, readonly) BOOL userPaused;
@property (nonatomic, assign, readwrite, getter=isAutoplay) BOOL autoplay;
- (BOOL)play;
- (BOOL)pause;
- (void)stop;
- (void)stopAndFadeOut;
@property (nonatomic, copy, readwrite, nullable) void(^playDidToEnd)(SJVideoPlayer *player);
- (void)jumpedToTime:(NSTimeInterval)time completionHandler:(void (^ __nullable)(BOOL finished))completionHandler;
- (void)seekToTime:(CMTime)time completionHandler:(void (^ __nullable)(BOOL finished))completionHandler;
@property (nonatomic, assign, readwrite) BOOL disableRotation;
@property (nonatomic, copy, readwrite, nullable) void(^willRotateScreen)(SJVideoPlayer *player, BOOL isFullScreen);
@property (nonatomic, copy, readwrite, nullable) void(^rotatedScreen)(SJVideoPlayer *player, BOOL isFullScreen);
@property (nonatomic, assign, readonly) BOOL isFullScreen;
- (void)setPlaceholder:(UIImage *)placeholder;
@property (nonatomic, copy, readwrite) void(^clickedBackEvent)(SJVideoPlayer *player);
@property (class, nonatomic, copy, readonly) void(^update)(void(^block)(SJVideoPlayerSettings *commonSettings));
+ (void)resetSetting; // 重置配置, 恢复默认设置
@property (nonatomic, strong, readwrite, nullable) NSArray<SJVideoPlayerMoreSetting *> *moreSettings;
@property (nonatomic, assign, readwrite) BOOL generatePreviewImages;
@property (nonatomic, assign, readwrite) float rate; /// 0.5 .. 1.5
- (void)resetRate;
@property (nonatomic, copy, readwrite, nullable) void(^rateChanged)(SJVideoPlayer *player);
@property (nonatomic, copy, readwrite, nullable) void(^internallyChangedRate)(SJVideoPlayer *player, float rate);
- 适配 scrollView.
- 支持盲区. 指定区域不触发全屏手势. 可指定Frame或者View.
- 支持切换. 系统边缘手势与全屏手势随意切换.
- 支持禁用手势.