Polyv Help Center

Help Center

Channel Settings

Updated: 2024-10-10 17:27:10

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 Layout

2.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);

3. Skin Theme

3.1 Get Channel Skin Theme Settings

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

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
browserFavIcon Browser tab icon undefined | string
channelCoverImg Channel icon image URL string
splashImg Guide page cover image undefined | string
mobileSplashLargeImg Mobile guide page large image undefined | string
pcWatchBackgroundImage PC watch page background image undefined | string
mobileChatBackgroundImage Mobile chat room background image undefined | string
mobileChatBackgroundImageAmbiguity Chat room background blur, 0 ~ 100 undefined | number
portraitBackgroundImage Portrait background image undefined | string
portraitBackgroundImageAmbiguity Portrait background image opacity, 0 ~ 100 undefined | number

Example:

const setting = watchCore.channel.getThemeSetting();
console.log('皮肤风格:', setting.pageSkin);
console.log('直播间图标:', setting.channelCoverImg);
联系客服,在线咨询
在线咨询