//
//  NvLiveWindowPanelView.h
//  SDKDemo
//
//  Created by  on 2018/5/30.
 //
//

#import <UIKit/UIKit.h>
#import "NvsTimeline.h"
#import "NvsStreamingContext.h"
#import "NVHeader.h"

@protocol NvLiveWindowPanelViewDelegate <NSObject>

@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 NvLiveWindowPanelView : UIView

@property (nonatomic, weak) id <NvLiveWindowPanelViewDelegate> delegate;
@property (nonatomic, strong) NvsLiveWindow *liveWindow;
@property (nonatomic, strong) UIView *controlPanelView;
@property (nonatomic, assign) NvEditMode editMode;

@property (nonatomic, assign) int64_t currentTime;

@property (nonatomic, strong) UISlider *progressSlider;
@property (nonatomic, assign) BOOL forceHiddenControlPanel;

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

//设置从这个位置播放
- (void)playAtTime:(int64_t)pos;
//从start播放到end
- (void)playBackStart:(int64_t)start end:(int64_t)end;
//调用点击播放按钮的方法
- (void)playbackBtnClicked;
//显示ControllPanel，并会开启定时器3秒后消失
- (void)showControllPanel;
//隐藏音量按钮
- (void)hiddenVolumeButton;
//点击屏幕暂停
- (void)addTapScreenPause;
//移除点击屏幕暂停
- (void)removeTapScreenPause;
@end
