Class Info |
|---|
public class InstreamView extends PPSPlacementView implements IInstreamView 贴片广告视图。 |
Qualifier and Type | Class Name and Description |
|---|---|
interface | InstreamView.OnInstreamAdClickListener 贴片广告点击监听器。 |
Constructor Name |
|---|
InstreamView(Context context) 贴片广告视图构造函数。 |
InstreamView(Context context, AttributeSet attrs) 贴片广告视图构造函数。 |
InstreamView(Context context, AttributeSet attrs, int defStyleAttr) 贴片广告视图构造函数。 |
Qualifier and Type | Class Name and Description |
|---|---|
void | destroy() 销毁贴片广告视图。 |
View | 获取点击行为视图。 |
boolean | 获取当前是否正在播放。 |
void | mute() 静音贴片广告。 |
void | onClose() 关闭贴片广告。 |
void | pause() 暂停播放贴片广告。 |
void | play() 播放贴片广告。 |
void | removeInstreamMediaChangeListener() 移除贴片媒体切换监听器。 |
void | removeInstreamMediaStateListener() 移除贴片广告媒体状态监听器。 |
void | 移除媒体静音监听器。 |
void | setCallToActionView(View callToActionView) 设置点击行为视图。 |
void | setInstreamAds(List<InstreamAd> ads) 设置贴片广告。 |
void | setInstreamMediaChangeListener(InstreamMediaChangeListener mediaChangeListener) 设置贴片广告媒体切换监听器。 |
void | setInstreamMediaStateListener(InstreamMediaStateListener stateListener) 设置贴片广告媒体状态监听器。 |
void | setMediaMuteListener(MediaMuteListener muteListener) 设置媒体静音监听器。 |
void | setOnInstreamAdClickListener(OnInstreamAdClickListener clickListener) 设置贴片广告点击监听器。 |
void | stop() 停止播放贴片广告。 |
void | unmute() 取消静音。 |
void | showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) 展示广告主信息弹框。 |
void | 隐藏广告主信息弹框。 |
void | showTransparencyDialog(View anchorView) 展示广告透明性弹框。 |
void | showTransparencyDialog(View anchorView, int[] location) 展示广告透明性弹框。 |
void | 隐藏广告透明性弹框 。 |
Constructor |
|---|
public InstreamView(Context context) 贴片广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
Constructor |
|---|
public InstreamView(Context context, AttributeSet attrs) 贴片广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
attrs | 视图属性集合。 |
Constructor |
|---|
InstreamView(Context context, AttributeSet attrs, int defStyleAttr) 贴片广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
attrs | 视图属性集合。 |
defStyleAttr | 默认样式。 |
Method |
|---|
public View getCallToActionView() 获取点击行为视图。 |
Returns
Type | Description |
|---|---|
View | 点击行为视图。 |
Method |
|---|
public boolean isPlaying() 获取当前贴片广告视图广告媒体是否正在播放。 |
Returns
Type | Description |
|---|---|
boolean | 当前是否正在播放广告媒体:
|
Method |
|---|
public void removeInstreamMediaChangeListener() 移除贴片媒体切换监听器。 |
Method |
|---|
public void removeInstreamMediaStateListener() 移除贴片广告媒体状态监听器。 |
Method |
|---|
public void setCallToActionView(View callToActionView) 设置点击行为视图。 |
Parameters
Name | Description |
|---|---|
callToActionView | 点击行为视图。 |
Method |
|---|
public void setInstreamAds(List<InstreamAd> ads) 设置贴片广告。 |
Parameters
Name | Description |
|---|---|
ads | 贴片广告列表。 |
Method |
|---|
public void setInstreamMediaChangeListener(InstreamMediaChangeListener mediaChangeListener) 设置贴片广告媒体切换监听器。 |
Parameters
Name | Description |
|---|---|
mediaChangeListener | 贴片广告媒体切换监听器。 |
Method |
|---|
public void setInstreamMediaStateListener(InstreamMediaStateListener stateListener) 设置贴片广告媒体状态监听器。 |
Parameters
Name | Description |
|---|---|
stateListener | 贴片广告媒体状态监听器。 |
Method |
|---|
public void setMediaMuteListener(MediaMuteListener muteListener) 设置媒体静音监听器。 |
Parameters
Name | Description |
|---|---|
muteListener | 媒体静音监听器。 |
Method |
|---|
public void setOnInstreamAdClickListener(OnInstreamAdClickListener clickListener) 设置贴片广告点击监听器。 |
Parameters
Name | Description |
|---|---|
clickListener | 贴片广告点击监听器。 |
Method |
|---|
public void showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) 展示广告主信息弹框。 |
Parameters
Name | Description |
|---|---|
anchorView | 锚点视图,弹框会根据锚点视图位置展示。 |
showWhyThisAd | 广告主信息弹框上是否显示为什么看到此广告。 |
Method |
|---|
public void showTransparencyDialog(View anchorView) 展示广告透明性弹框。 |
Parameters
Name | Description |
|---|---|
anchorView | 媒体自定义组件,弹框会基于组件位置展示。 |