You need to enable JavaScript to run this app.
最新活动
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们
导航

数据类型

最近更新时间2023.08.24 19:49:33

首次发布时间2022.07.13 16:53:43

TVURoomAuthMode

直播间的鉴权模式。

public enum com.bytedance.live.sdk.player.TVULiveRoom.TVURoomAuthMode

枚举值

类型

说明

PUBLIC

公开模式:观众以游客身份进入直播间,在评论或点赞等需要用户信息的场景下,需要先进行登录操作。

CUSTOM

自定义模式:观众在进入直播间时使用的是在您 App 内的用户信息,因此可以直接进行评论、点赞等操作。

InitConfig

独立播放器初始化配置。

public class InitConfig {
    public SinglePlayerListener singlePlayerListener;
    public PlayConfig playConfig = new PlayConfig();
}

属性

名称

类型

说明

singlePlayerListener

SinglePlayerListener

独立播放器的回调类。

playConfig

PlayConfig

播放配置。

注意

以下属性自 1.26.0 版本开始不再支持使用:

  • activityIdLong 类型。要进入的直播间活动 ID,可以通过调用 CreateActivityAPIV2 获取。
  • tokenString 类型。进入该直播间所需的授权 token,可以通过调用 GetSDKTokenAPI 获取。
  • authModeTVURoomAuthMode 类型。直播间的鉴权模式,包含公开(PUBLIC)和自定义(CUSTOM)两种。具体选择哪种取决于 GetSDKTokenAPI 传入的 mode 参数的值。
    • PUBLICmode=1 时设置为公开模式。观众以游客身份进入直播间,在评论或点赞等需要用户信息的场景下,需要先进行登录操作。
    • CUSTOMmode=2 时设置为自定义模式。观众在进入直播间时使用的是在您 App 内的用户信息,因此可以直接进行评论、点赞等操作。

PlayConfig

播放配置。

public class PlayConfig {
    public boolean isLiveAutoPlay = true;
    public boolean isForeShowAutoPlay = true;
    public boolean isPlayBackAutoPlay = true;
    public boolean isForeShowLoop = true;
    public boolean isPlayBackLoop =true;
}

属性

名称

类型

说明

isLiveAutoPlay

Boolean

直播是否自动播放。默认为 true

isForeShowAutoPlay

Boolean

预告是否自动播放。默认为 true

isPlayBackAutoPlay

Boolean

回放是否自动播放。默认为 true

isForeShowLoop

Boolean

预告是否自动循环播放。默认为 true

isPlayBackLoop

Boolean

回放是否自动循环播放。默认为 true

RedirectInfo

实现跳转所需的信息。

public class RedirectInfo {
    public static final int CONTENT_TYPE_URL = 1;
    public static final int CONTENT_TYPE_COMMENT = 2;

    private final String entrance;
    private final int contentType;
    private UrlRedirectInfo urlRedirectInfo;
    private SingleCommentModel commentModel;
}

属性

名称

类型

说明

entrance

String

点击事件入口。

  • bannerAdvertisement:点击页中广告(横屏模式)
  • floatingShoppingCard:点击商品卡片(竖屏模式)、商品浮窗
  • businessAccount:点击主播账号头像(竖屏模式)
  • floatingAdvertisement:点击浮标广告
  • commentLink:点击评论中的链接
  • headerAdvertisement:点击页头广告(横屏模式)
  • commentNickName:点击评论区的用户昵称

contentType

Integer

内容类型。

  • CONTENT_TYPE_URL(1):用于点击 URL 跳转,此时 urlRedirectInfo 字段不为空。
  • CONTENT_TYPE_COMMENT(2):用于点击评论区用户昵称跳转,此时 commentModel 字段不为空。

urlRedirectInfo

UrlRedirectInfo

点击 URL 跳转所需的信息。当 contentType1 时此字段不为空。

commentModel

SingleCommentModel

点击评论区的用户昵称跳转所需的信息。当 contentType2 时此字段不为空。

UrlRedirectInfo

点击 URL 跳转所需的信息。

public class UrlRedirectInfo {
    private final String url;
    private final boolean enableFloating;
}

属性

名称

类型

说明

url

String

用户在企业直播控制台设置的跳转链接。

enableFloating

Boolean

用户在企业直播控制台是否设置为观看页浮层展示内容。

  • true:在观看页浮层展示内容。
  • false:在新页面展示内容。

SingleCommentModel

点击评论区的用户昵称跳转所需的信息。

public class SingleCommentModel extends BaseObservable {
    protected final String mNickname;
    protected String externalUserId = null;
    protected final String mContent;
    protected final boolean mIsPresenter;
    protected final long mMsgId;
}

属性

名称

类型

说明

mNickname

String

发送评论的用户昵称。

externalUserId

String

发送评论的用户的外部 UserId。此 ID 是调用 GetSDKTokenAPI 接口时传入的 UserIdStr

mContent

String

评论内容。

mIsPresenter

Boolean

发送评论的用户是否为主持人。

  • true:是
  • false:否

mMsgId

Long

评论 ID。

NotificationInfo

连麦中页面切到后台时,弹出的前台通知样式。

public class NotificationInfo {
    private int smallIconResId;
    private String contentTitle;
    private String contentText;
  }

属性

名称

类型

说明

smallIconResId

Integer

前台通知图标的资源 ID。

contentTitle

String

前台通知的标题。

contentText

String

前台通知的内容。

SimpleLayoutParams

视图的自定义位置。

public class SimpleLayoutParams {
    private int gravity;
    private int marginLeftDp;
    private int marginRightDp;
    private int marginTopDp;
    private int marginBottomDp;
}

属性

名称

类型

说明

gravity

Integer

定义视图在其父布局中的位置和对齐方式。具体取值,详见 android.view.Gravity

marginLeftDp

Integer

视图距其父布局左侧的边距。单位:dp。

marginRightDp

Integer

视图距其父布局右侧的边距。单位:dp。

marginTopDp

Integer

视图距其父布局顶部的边距。单位:dp。

marginBottomDp

Integer

视图距其父布局底部的边距。单位:dp。

CustomSize

视图的自定义大小。

public class CustomSize {
    private int widthDp;
    private int heightDp;
}

属性

名称

类型

说明

widthDp

Integer

视图的宽度。单位:dp。

heightDp

Integer

视图的高度。单位:dp。