SellyCloudSDK_demo/SellyCloudSDK/sdk/SellyCloudSDK.framework/Headers/SellyVideoPlayer.h

57 lines
1.6 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// 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