File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,39 @@ mVideoPlusView.startService(ServiceType.ServiceTypeVideoMode, new HashMap<String
415415
416416```
417417
418+ ## 前后贴
418419
420+ 跟` 视联网模式 ` 的启动方式差不多,第一个ServiceType是个枚举。
421+
422+ ```
423+ // ServiceTypeVideoMode(1),//视联网模式
424+ // ServiceTypeFrontVideo(3),//前帖广告
425+ // ServiceTypeLaterVideo(4),//后贴广告
426+ // ServiceTypePauseAd(5);//暂停广告
427+
428+ HashMap<String, String> params = new HashMap<>();
429+ // duration 参数指定倒计时
430+ params.put("duration", "60");
431+ mVideoPlusView.startService(ServiceType.ServiceTypeFrontVideo, params, new IServiceCallback() {
432+ @Override
433+ public void onCompleteForService() {
434+
435+ }
436+
437+ @Override
438+ public void onFailToCompleteForService(Throwable throwable) {
439+ if (type == ServiceType.ServiceTypeFrontVideo) {
440+ VenvyUIUtil.runOnUIThread(new Runnable() {
441+ @Override
442+ public void run() {
443+ mVideoPlayer.startPlayLogic();
444+ }
445+ });
446+ }
447+ }
448+ });
449+
450+ ```
419451
420452
421453## 其他
You can’t perform that action at this time.
0 commit comments