//
//  NvClipLiveWindow.h
//  SDKDemo
//
//  Created by 刘东旭 on 2018/7/6.
 //
//

#import <UIKit/UIKit.h>
#import "NVHeader.h"
#import "NvsLiveWindow.h"
#import "NvsVideoClip.h"
#import "NvTimelineDataModel.h"

@protocol NvClipLiveWindowDelegate

@optional
- (void)playback;
- (void)volumnClicked;

- (void)didPlaybackTimelinePosition:(NvsTimeline *)timeline position:(int64_t)position;

- (void)didPlaybackStopped:(NvsTimeline *)timeline;

- (void)didPlaybackEOF:(NvsTimeline *)timeline;

- (void)sliderValueChanged:(float)value;

- (void)didStreamingEngineStateChanged:(NvsStreamingEngineState)state;
@end

@interface NvClipLiveWindow : UIView

@property (nonatomic, weak) id delegate;
@property (nonatomic, strong) NvsLiveWindow *liveWindow;
@property (nonatomic, assign) NvEditMode editMode;
@property (nonatomic, strong, readonly) UISlider *progressSlider;
@property (nonatomic, strong) NvsVideoClip *clip;//需要播放的片段
@property (nonatomic, strong) NvEditDataModel *model;//需要播放的片段
@property (nonatomic, assign) BOOL isPause;
//链接timeline
- (void)connectTimeline:(NvsTimeline *)timeline;
//设置播放时间范围
- (void)setPlayRangeIn:(int64_t)rangeIn rangeOut:(int64_t)rangeOut;
//播放
- (void)play;
//暂停
- (void)pause;
//seek
- (void)seekTimeline:(int64_t)pos;
//seek当前画面，不需要传参
- (void)seekTimeline;

@end
