BBASMRewardAdRender.h 1.42 KB
//
//  BBASMRewardAdRender.h
//  SWAN
//
//  Created by baidu on 2018/9/3.
//  Copyright © 2018年 baidu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BBASMInstance.h"
#import "BBASMRewardVideoAdInner.h"

@interface BBASMRewardAdRender : NSObject

/// inner用于更新生命周期
@property (nonatomic, weak) BBASMRewardVideoAdInner *adInner;

/**
 * @brief 解析数据
 *
 * @param adInstance 广告本体
 * @param appId 游戏Id
 * @return View对象
 */
- (instancetype)initWithAdInstance:(BBASMInstance *)adInstance appId:(NSString *)appId videoView:(UIView *)videoView;

/**
 * @brief 展现
 *
 */
- (void)show;

/**
 * @brief 激励视频正常关闭
 *
 */
- (void)setVideoEnd;

/**
 * @brief 激励视频跳过
 *
 */
- (void)setVideoSkip;

/**
 * @brief 播放结束
 *
 */
- (void)playerDidEnd;

/**
 * @brief 视频播放
 *
 */
- (void)playerDidPlay;

/**
 * @brief 视频暂停
 *
 * @param over 是否暂停
 * @param time 当前播放时间
 */
- (void)playerDidPause:(BOOL)over time:(NSTimeInterval)time;

/**
 * @brief 播放器代理 更新左上角进度
 *
 * @param currentTime 当前时间
 * @param duration 总时长
 */
- (void)videoPlayerUpdateTimeProgress:(double)currentTime
                             duration:(double)duration;

/**
 * @brief 播放器启动通知
 *
 * @param over 结束
 */
- (void)playerDidPlaySuccess:(BOOL)over;

/**
 * @brief 播放器失败
 *
 */
- (void)playerDidFailed;

@end