Skip to content

Commit dbca447

Browse files
authored
Merge pull request #2 from VideoOS/doc
增加常见问题
2 parents c6a1018 + 135caa2 commit dbca447

File tree

1 file changed

+74
-1
lines changed

1 file changed

+74
-1
lines changed

docs/index.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,81 @@ VPInterfaceStatusNotifyDelegate ```- (void)vp_interfaceActionNotify```, 会回
152152

153153
#### 常见问题
154154

155-
[VideoOS iOS SDK对接常见问题](https://os-lab.videojj.com/topic/70/ios-sdk对接常见问题)
155+
### 1、点位投放以后再页面中看不到投放的点位
156+
请检查`- (NSTimeInterval)videoPlayerCurrentTime`是否对接正确,注意当前播放时间, 单位为秒, 包括小数
157+
158+
### 2、点位位置不正确
159+
请检查`- (VPIVideoPlayerSize *)videoPlayerSize`是否对接正确,如果该方法对接正确,请检查页面横竖屏切换时,是否更新了VPInterfaceController方向`- (void)notifyVideoScreenChanged:(VPIVideoPlayerOrientation)type`
160+
161+
### 3、点击页面以后,没有打开链接
162+
VideoOS所有的链接打开都由对接平台打开,通过`- (void)vp_interfaceActionNotify:(NSDictionary *)actionDictionary`方法传递给对接平台,`VPIActionTypeOpenUrl`表示需要对接平台打开链接
163+
164+
### 4、各种应用显示、点击、关闭是否有事件通知
165+
有,大部分的事件由`- (void)vp_interfaceActionNotify:(NSDictionary *)actionDictionary`方法传递给对接平台
166+
167+
```objective-c
168+
/**
169+
* 事件发送通知类型枚举
170+
*/
171+
typedef NS_ENUM(NSUInteger, VPIEventType) {
172+
VPIEventTypePrepareShow = 1, //
173+
VPIEventTypeShow, // 显示
174+
VPIEventTypeClick, // 点击
175+
VPIEventTypeClose, // 关闭
176+
VPIEventTypeBack, // 中插返回
177+
};
178+
179+
/**
180+
* 事件处理通知类型枚举
181+
*/
182+
typedef NS_ENUM(NSUInteger, VPIActionType) {
183+
VPIActionTypeNone = 0, //
184+
VPIActionTypeOpenUrl, // 打开外链
185+
VPIActionTypePauseVideo, // 暂停视频
186+
VPIActionTypePlayVideo, // 播放视频
187+
VPIActionTypeGetItem, // 获得物品
188+
};
189+
190+
/**
191+
* 事件监控通知
192+
* @param actionDictionary 参数字典
193+
* 对应
194+
* Key: adID
195+
* Value: string
196+
*
197+
* Key: adName
198+
* Value: string
199+
*
200+
* Key: eventType
201+
* Value: VPIEventType
202+
*
203+
* Key: actionType
204+
* Value: VPIActionType
205+
*
206+
* Key: actionString
207+
* Value: string
208+
* 注:VPIActionTypeOpenUrl对应Url,VPIActionTypeGetItem对应ItemId
209+
*/
210+
- (void)vp_interfaceActionNotify:(NSDictionary *)actionDictionary;
211+
```
156212
213+
#### 5、中插广告视频的返回按钮怎么处理
214+
中插广告视频的返回按钮,通过`VPIEventTypeBack`通知对接平台,请按照视频的控制器的返回按钮相同的方法处理
215+
216+
#### 6、中插视频打开外链以后,关闭外链,怎么继续中插播放
217+
中插广告开始播放,会返回`VPIActionTypePauseVideo`事件,需要暂停视频;
218+
中插广告结束或被关闭,会返回`VPIActionTypePlayVideo`事件,需要重新播放视频;
219+
打开中插外链,会返回`VPIActionTypeOpenUrl`事件,此时中插广告是暂停的,打开的外外链关闭以后,需要调用`platformCloseActionWebView`,继续播放中插广告。
220+
221+
#### 7、云图/卡牌/投票 竖屏到全屏,图片显示有问题
222+
223+
`-(void)notifyVideoScreenChanged:(VPIVideoPlayerOrientation)type` 方法在切换屏幕前调用
224+
#### 8、在刘海屏 UI显示有问题
225+
(1)要确保` _interfaceController = [[VPInterfaceController alloc] initWithFrame:self.view.bounds config:config videoPlayerSize:videoPlayerSize]; `中的 self.view 为全屏
226+
227+
(2)`VPIVideoPlayerSize` 要正确
228+
229+
(3)适配刘海屏顶部的44像素
157230
## 本地化部署配置(开源版本)
158231
159232
### host配置

0 commit comments

Comments
 (0)