changsanjiang / SJVideoPlayer

iOS VideoPlayer MediaPlayer video player media player 短视频播放器 可接入 ijkplayer aliplayer alivodplayer plplayer
MIT License
2.46k stars 476 forks source link

进度条的自定义 #403

Open RickForC137 opened 3 years ago

RickForC137 commented 3 years ago

可以自定义进度条吗 比如在进度条中插入标记节点 用来告知用户视频中的一些元素

changsanjiang commented 3 years ago

目前只有如下的 stop 节点, 你看看能不能修改一下代码, 提个pr上来

// 获取slider
#import <SJVideoPlayer/SJProgressSlider.h>
    SJProgressSlider *slider = [_player.defaultEdgeControlLayer.bottomAdapter itemForTag:SJEdgeControlLayerBottomItem_Progress].customView;
    NSLog(@"%@", slider);

// stop 节点
@interface SJProgressSlider (StopNode)

@property (nonatomic) BOOL showsStopNode;

@property (nonatomic, strong, null_resettable) UIView *stopNodeView;

/// 0..1
@property (nonatomic) CGFloat stopNodeLocation;

- (void)setStopNodeViewCornerRadius:(CGFloat)cornerRadius size:(CGSize)size;
- (void)setStopNodeViewCornerRadius:(CGFloat)cornerRadius size:(CGSize)size backgroundColor:(UIColor *)backgroundColor;
@end
zeqinjie commented 3 years ago

+1