BBASMAdVideoProtocol.h 1.21 KB
//
//  BBASMAdVideoDelegate.h
//  SWANAd
//
//  Created by xutingting on 2020/7/14.
//  Copyright © 2020 Baidu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BBASMAdVideoHandlerDelegate.h"

@protocol BBASMAdVideoProtocol <NSObject>

/**
 * @brief 播放视频
 * @param superView 父视图
 * @param frame frame
 * @param videoInfo 视频信息
 * @param superViewController 父vc
 */
- (void)playVideoInView:(UIView *)superView
              withFrame:(CGRect)frame
              videoInfo:(NSDictionary *)videoInfo
        videoController:(UIViewController *)superViewController
               delegate:(id<BBASMAdVideoHandlerDelegate>)delegate;

/**
 * @brief 当前时间
 *
 * @return 时间
 */
- (NSTimeInterval)currentTime;

/**
 * @brief 播放器静音
 *
 * @param silence 是否静音
 */
- (void)changeCurrentVideoSilencePlayer:(BOOL)silence;

/**
 * @brief 是否正在播放
 */
- (BOOL)currentIsPlaying;

/**
 * @brief 开始播放
 */
- (void)startPlay;

/**
 * @brief 暂停播放
 */
- (void)pause;

/**
 * @brief 继续播放
 */
- (void)resume;

/**
 * @brief 停止播放器,内核释放 (destroy) - 默认不向外部发送停止声音事件
 */
- (void)stop;

@end