57 lines
1.6 KiB
Objective-C
57 lines
1.6 KiB
Objective-C
//
|
||
// SellyVideoPlayer.h
|
||
// SellyCloudSDK
|
||
//
|
||
// Created by Caleb on 17/9/25.
|
||
//
|
||
|
||
/**
|
||
1、SellyVODPlayer、SellyCloudRtmpPlayer、SellyRtcPlayer将事件通过SellyPlayerDelegate代理回调到SellyVideoPlayer
|
||
2、SellyVideoPlayer将收到的事件汇总处理后通过SellyPlayerManagerDelegate回调给业务层
|
||
*/
|
||
|
||
#import <Foundation/Foundation.h>
|
||
#import "SellyPlayerStreamInfo.h"
|
||
@protocol SellyPlayerManagerDelegate;
|
||
|
||
NS_ASSUME_NONNULL_BEGIN
|
||
@interface SellyVideoPlayer : NSObject
|
||
//接盾的情况下请调用该方法初始化
|
||
- (instancetype)initWithStreamInfo:(SellyPlayerStreamInfo *)streamInfo;
|
||
- (instancetype)initWithUrl:(NSURL *)url;
|
||
|
||
- (void)prepareToPlay;
|
||
- (void)play;
|
||
- (void)pause;
|
||
- (void)stop;
|
||
- (BOOL)isPlaying;
|
||
|
||
/** 截取当前图片 */
|
||
- (UIImage *)getCurrentImage;
|
||
|
||
//业务层需要将这个view加在页面上显示
|
||
@property (nonatomic, strong, readonly)UIView *view;
|
||
//代理
|
||
@property (nonatomic, weak) id<SellyPlayerManagerDelegate> delegate;
|
||
//音量 静音播放设置0即可
|
||
@property (nonatomic, assign) CGFloat playbackVolume;
|
||
//播放状态
|
||
@property(nonatomic, readonly) SellyPlayerState playbackState;
|
||
//缩放
|
||
@property (nonatomic, assign)SellyPlayerScalingMode scaleMode;
|
||
|
||
#warning 以下属性对点播生效
|
||
//是否自动开始播放,默认true
|
||
@property(nonatomic) BOOL shouldAutoplay;
|
||
//视频时长
|
||
@property(nonatomic, readonly) NSTimeInterval duration;
|
||
//可播放时长
|
||
@property(nonatomic, readonly) NSTimeInterval playableDuration;
|
||
@property(nonatomic) NSTimeInterval currentPlaybackTime;
|
||
@property(nonatomic, readonly) BOOL isPreparedToPlay;
|
||
@property(nonatomic) float playbackRate;
|
||
|
||
@end
|
||
|
||
NS_ASSUME_NONNULL_END
|