Polyv Help Center

Help Center

Channel Settings

Updated: 2026-07-17 15:16:39

This document primarily describes the API documentation related to channel settings provided by 频道模块(channel). See below for details:

1. Watch Page Settings

1.1 Get Watch Page Settings

Used to retrieve the watch page settings configured in the admin backend.

Api Method: getWatchSetting(): ChannelWatchSetting

Return Value Description: Channel watch page settings, type ChannelWatchSetting. Detailed type description is as follows:

Property Name Description Type
watchEnabled Watch page toggle boolean
mobileWatchEnabled Mobile watch page toggle boolean
splashEnabled Guide page toggle boolean

Example:

const setting = watchCore.channel.getWatchSetting();
if (!setting.watchEnabled) { alert('当前观看页暂未开放'); }
if (isMobile && !setting.mobileWatchEnabled) { alert('暂不支持移动端观看'); }

2. Page Advertisements

2.1 Get Channel Page Advertisement Settings

Used to retrieve the page advertisement settings configured in the admin backend.

Starting from v1.2.0, you can use PlvChannelModule.generateDefaultPageAdvertSetting() to get the default configuration.

Api Method: getPageAdvertSetting(): ChannelAdvertSetting

Return Value Description: Channel page advertisement settings, type ChannelAdvertSetting. Detailed type description is as follows:

Property Name Description Type
pageAdvertEnabled Page advertisement toggle boolean
closeAdvertEnabled Allow closing page advertisements boolean
pageAdvertList Page advertisement list PageAdvertItem[]

Example:

const setting = watchCore.channel.getPageAdvertSetting();
console.log('页面广告开关:', setting.pageAdvertEnabled);
console.log('允许关闭页面广告:', setting.closeAdvertEnabled);

2.2 Get Channel Page Advertisement List

Used to retrieve the page advertisement list configured in the admin backend.

Api Method: getPageAdvertList(): PageAdvertItem[]

Return Value Description: Advertisement list, type PageAdvertItem[]

Example:

const advertList = watchCore.channel.getPageAdvertList();
advertList.forEach((item, index) => {
  console.log('广告内容', index, item.content);
  console.log('广告类型', index, item.advertType); // PageAdvertType
  console.log('跳转地址', index, item.href);
});

Interface: PageAdvertItem Page Advertisement Information

Property Name Description Type
content Advertisement content string
advertType Advertisement type PageAdvertType
href Redirect URL string
jumpWay Redirect method LinkJumpWay
link Redirect link string
mobileLink Mobile redirect link string
mobileAppLink Mobile app redirect link string
mobileAppLinkJumpWay Mobile app redirect method LinkJumpWay
pcLink PC redirect link string
pcLinkJumpWay PC redirect method LinkJumpWay
wxMiniprogramAppId WeChat Mini Program app ID string
wxMiniprogramLink WeChat Mini Program page path and parameters string
wxMiniprogramOriginalId WeChat Mini Program original ID string
iosLink iOS redirect link string
androidLink Android redirect link string
harmonyLink Harmony redirect link string
hrefType Redirect type string

Enum: PageAdvertType Page Advertisement Type

Constant Enum Member Description
'text' PageAdvertType.Text Text advertisement
'image' PageAdvertType.Image Image advertisement

3. Icon Advertisements

3.1 Get Channel Icon Advertisement Settings

Api Method: getImgAdvertSetting(): ChannelIconAdvertSetting

Supported from v2.0.0

Return Value Description: Channel icon advertisement settings, type ChannelIconAdvertSetting. Detailed type description is as follows:

Property Name Description Type
imgAdvertEnabled Icon advertisement toggle boolean
closeImgAdvertEnabled Whether icon advertisement can be closed boolean
imgAdvertList Icon advertisement list IconAdvertItem[]

Example:

const iconSetting = watchCore.channel.getImgAdvertSetting();
console.log('图标广告开关:', iconSetting.iconAdvertEnabled);
console.log('关闭按钮是否显示:', iconSetting.closeIconAdvertEnabled);

3.2 Get Channel Icon Advertisement List

Api Method: getIconAdvertList(): IconAdvertItem[]

Supported from v2.0.0

Return Value Description: Type IconAdvertItem[]

Used to retrieve the page footer information from the admin backend.

Api Method: getPageFooterSetting(): ChannelPageFooterSetting

Return Value Description: Page footer settings, type ChannelPageFooterSetting. Detailed type description is as follows:

Property Name Description Type
footerEnabled Page footer toggle boolean
footerText Page footer text string
footerLink Page footer full link string
footerTextLinkProtocol Page footer link domain, e.g., https:// string
footerTextLinkUrl Page footer link address, e.g., www.polyv.net string
copyrightInfoList Copyright information HTML fragment list string[]

Example:

const footerSetting = watchCore.channel.getPageFooterSetting();
console.log('页脚开关:', footerSetting.footerEnabled);
console.log('页脚文案:', footerSetting.footerText);
console.log('页脚链接:', footerSetting.footerLink);

5. Official Account Follow

5.1 Get Channel Follow Settings

Used to retrieve the follow settings from the admin backend.

Api Method: getFollowSetting(): ChannelFollowSetting

Return Value Description: Channel follow settings, type ChannelFollowSetting. Detailed type description is as follows:

Property Name Description Type
followEnabled Follow toggle boolean
followAutoShow Active popup boolean
followEntrance Entry text string
followImage QR code image undefined | string
followTips Mobile popup prompt text undefined | string
pcFollowTips PC popup prompt text undefined | string

Example:

const setting = watchCore.channel.getFollowSetting();
console.log('关注开关:', setting.followEnabled);
console.log('入口文案:', setting.followEntrance);
console.log('二维码图片:', setting.followImage);

6. Multi-Language

6.1 Get Channel Multi-Language Settings

Used to retrieve the multi-language settings from the admin backend.

Api Method: getLangSetting(): ChannelLangSetting

Return Value Description: Channel multi-language settings, type ChannelLangSetting. Detailed type description is as follows:

Property Name Description Type
preferRecommendSetting Prefer recommended configuration boolean
englishSettingEnabled Bilingual interface toggle boolean
aiTranslationEnabled AI multi-language translation toggle boolean
langSwitchEnabled Multi-language toggle boolean
isShowSevenLanguage Whether to display seven-country multi-language boolean
japLangEnabled Whether to replace English selection text with Japanese text boolean
isFollowBrowserLang Whether to follow browser language boolean
defaultLangType Default language type for watch page configuration LanguageType

Example:

const setting = watchCore.channel.getLangSetting();
console.log('多语言开关:', setting.langSwitchEnabled);
console.log('双语界面开关:', setting.englishSettingEnabled);
console.log('是否跟随浏览器语言:', setting.isFollowBrowserLang);
console.log('默认的语言类型:', setting.defaultLangType);

7. Page Layout

7.1 Get Channel Layout Settings

Used to retrieve the page layout related settings from the admin backend.

Api Method: getLayoutSetting(): ChannelLayoutSetting

Return Value Description: Channel layout settings, type ChannelLayoutSetting. Detailed type description is as follows:

Property Name Description Type
mainScreenLayoutMode Three-screen main screen layout mode MainScreenLayoutMode
mobileSplashLayout Mobile guide page layout MobileSplashLayout
mobileWatchLayout Mobile watch page layout MobileWatchLayout

Example:

const setting = watchCore.channel.getLayoutSetting();
console.log('三分屏主屏布局模式:', setting.mainScreenLayoutMode);
console.log('移动端引导页布局:', setting.mobileSplashLayout);
console.log('移动端观看页页布局:', setting.mobileWatchLayout);

8. Skin Theme

8.1 Get Watch Page Theme Style Configuration

When themeStyleType is ChannelWatchThemeStyleType.Theme, you can pass a theme to get the related style configuration.

v1 Spring Festival skin URL 'https://s2.videocc.net/watch-theme/spring/v1/config.json' v2 Spring Festival skin URL 'https://s2.videocc.net/watch-theme/spring/v2/config.json' v2 Black Mirror skin URL 'https://s2.videocc.net/watch-theme/black-golden/v2/config.json'

Api Method: getWatchThemeStyleConfig(theme: string, opts?: Object): Promise<T>

Supported from v2.14.0

Parameter Description:

  • theme: Type string, required

  • opts: Type Object, optional, default {}. Detailed type description is as follows:

Parameter Name Description Type Required Default Value
url - string No -

Return Value Description: Type Promise<T>

8.2 Get Channel Skin Theme Settings

Used to retrieve the skin theme settings from the admin backend.

Starting from v1.2.0, you can use PlvChannelModule.generateDefaultThemeSetting() to get the default configuration.

Api Method: getThemeSetting(): ChannelThemeSetting

Return Value Description: Channel skin theme settings, type ChannelThemeSetting. Detailed type description is as follows:

Property Name Description Type
pageSkin Watch page skin ChannelWatchPageSkin
watchTheme Watch page theme null | string
styleType Style type ChannelWatchThemeStyleType
browserFavIcon Browser tab icon string
channelCoverImg Channel icon image URL string
splashImg Guide page cover image string
splashImgBackgroundId Guide page cover image background ID undefined | number
mobileSplashLargeImg Mobile guide page large image string
pcWatchBackgroundImage PC watch page background image undefined | string
mobileChatBackgroundType Mobile chat room background image type BackgroundType
mobileChatBackgroundImage Mobile chat room background image undefined | string
mobileChatBackgroundImageAmbiguity Chat room background image blur, 0 ~ 100 undefined | number
portraitBackgroundType Portrait background image type BackgroundType
portraitBackgroundImage Portrait background image undefined | string
portraitBackgroundImageAmbiguity Portrait background image transparency, 0 ~ 100 undefined | number
playerBackgroundType Player background image type BackgroundType
playerBackgroundImage Player background image undefined | string
playerBackgroundImageAmbiguity Player background image transparency, 0 ~ 100 undefined | number
descInfoCardEnabled Live stream introduction info card toggle, enabled by default boolean

Example:

const setting = watchCore.channel.getThemeSetting();
console.log('皮肤风格:', setting.pageSkin);
console.log('直播间图标:', setting.channelCoverImg);

8.3 Get Product Library Icon Configuration

Api Method: getProductIconConfig(): undefined | ProductIconConfig

Supported from v2.14.0

Return Value Description: Type undefined | ProductIconConfig

9. Stream Multi-Track Configuration / Dual Stream Configuration

9.1 Get Channel Stream Multi-Track Configuration

Multi-track configuration differs from multi-line configuration. Multi-line still retrieves the same source, but multi-track retrieves different push sources.

Api Method: getChannelStreamTrackConfig(): ChannelStreamTrackConfig

Supported from v1.8.0

Return Value Description: Channel stream multi-track configuration (dual stream), type ChannelStreamTrackConfig. Detailed type description is as follows:

Property Name Description Type
type Multi-track configuration class ChannelStreamTrackType
trackList Multi-track list ChannelStreamTrackItem[]

10. User Groups

10.1 Get Channel User Group Configuration

Api Method: getChannelViewerGroupConfig(): ChannelViewerGroupConfig

Supported from v2.16.0

Return Value Description: Channel user group configuration, type ChannelViewerGroupConfig. Detailed type description is as follows:

Property Name Description Type
chatViewerGroupEnabled Chat user group feature toggle boolean
channelViewerGroupEnabled Channel user group feature toggle boolean
onlyGroupWatchEnabled Restrict viewing to group users only toggle boolean
notInGroupCanWatchEnabled Whether viewing is allowed when not in the channel user group list boolean

11. Other Toggles

11.1 Get Channel Top Guide Bar Configuration

Api Method: getTopGuideSetting(): ChannelTopGuideSetting

Supported from v2.0.0

Return Value Description: Top guide bar configuration, type ChannelTopGuideSetting. Detailed type description is as follows:

Property Name Description Type
topGuideBarEnabled Guide bar toggle boolean
topGuideBarLogo Top LOGO string
topGuideBarContent Guide bar text string
topGuideBarButtonContent Button text string
topGuideBarAndroidRedirectUrl Redirect link: Android string
topGuideBarIosRedirectUrl Redirect link: iOS string
topGuideBarHarmonyOSRedirectUrl Redirect link: Harmony string
topGuideBarCloseable Whether closing is allowed boolean

11.2 Get Online List Toggle

Api Method: getOnlineListEnabled(): boolean

Supported from v1.8.0

11.3 Get Admin Bulletin Marquee Toggle

Api Method: getManagerBulletinMarqueeEnabled(): boolean

Supported from v2.0.0

11.4 Get Channel Message Effect Configuration

Api Method: getEffectSetting(): ChannelEffectSetting

Supported from v2.0.

联系客服,在线咨询