Properties
Private
#apiClient
#apiClient: default
Private
#debugConfig
#debugConfig: DebugConfig
Private
#projectConfig
#projectConfig: PlayerProjectConfig
Private
#serverTime
#serverTime: number
Private
_events
_events: EventLite = ...
Private
_params
_params: URLSearchParams
_pointersManager
_pointersManager: PointersManager
Private
_services
_services: Omit<Services, "apiClient" | "setupAnalytics">
avatarGenerator
avatarGenerator: string
avatarGeneratorTemplate
avatarGeneratorTemplate: string
channels
channels: default
devtools
devtools: {
addShortcut(): Promise<boolean>;
changeLanguage(language): Promise<void>;
closeSticky(): void;
purchaseProduct(product): Promise<boolean>;
requestReview(): Promise<RequestReviewResult>;
resumeSubscription(product, purchase): Promise<boolean>;
showCounter(apiReqCounter): void;
showFullscreen(): Promise<boolean>;
showPreloader(): Promise<boolean>;
showRewardedVideo(): Promise<boolean>;
showSticky(): Promise<boolean>;
showToast(__namedParameters): void;
unsubscribe(product, purchase): Promise<boolean>;
}
Type declaration
addShortcut:function
- addShortcut(): Promise<boolean>
Returns Promise<boolean>
changeLanguage:function
- changeLanguage(language): Promise<void>
Returns Promise<void>
closeSticky:function
- closeSticky(): void
Returns void
purchaseProduct:function
- purchaseProduct(product): Promise<boolean>
Returns Promise<boolean>
requestReview:function
- requestReview(): Promise<RequestReviewResult>
Returns Promise<RequestReviewResult>
resumeSubscription:function
- resumeSubscription(product, purchase): Promise<boolean>
Parameters
- product: Product
- purchase: PlayerPurchase
Returns Promise<boolean>
showCounter:function
- showCounter(apiReqCounter): void
Returns void
showFullscreen:function
- showFullscreen(): Promise<boolean>
Returns Promise<boolean>
showPreloader:function
- showPreloader(): Promise<boolean>
Returns Promise<boolean>
showRewardedVideo:function
- showRewardedVideo(): Promise<boolean>
Returns Promise<boolean>
showSticky:function
- showSticky(): Promise<boolean>
Returns Promise<boolean>
showToast:function
- showToast(__namedParameters): void
Returns void
unsubscribe:function
- unsubscribe(product, purchase): Promise<boolean>
Parameters
- product: Product
- purchase: PlayerPurchase
Returns Promise<boolean>
isGameStarted
isGameStarted: boolean = false
isGameplay
isGameplay: boolean = false
isMobile
isMobile: boolean
isPaused
isPaused: boolean = false
loader
loader: {
dec(): void;
inc(): void;
}
logger
logger: Logger = logger
onReady
onReady: ((sdk) => void)
overlay
overlay: {
changeAvatarGenerator(avatarGenerator): void;
changeLanguage(lang): Promise<void>;
close(): Promise<void>;
closeOrientationOverlay(): void;
closePreAdCountdownOverlay(): void;
closePreAdCountdownOverlayFinish(): void;
closeRewardedFailedOverlay(): void;
login(options?): Promise<{
secretCode?: string;
type: string;
}>;
openAchievements(achievementsInfo, __namedParameters?): Promise<void>;
openChat(channel, channelMessages, personalChannelData?): Promise<void>;
openDocument(document): Promise<void>;
openGamesCollections(gamesCollection): Promise<void>;
openLeaderboard(query, leaderbordInfo): Promise<void>;
openProductPurchase(product): Promise<void>;
pickPlayerOnConflict(conflictInfo): Promise<PlayerState>;
setSizeOffsets(sizeOffsets): void;
setUnsupportedDeviceOverlay(__namedParameters): void;
share(shareType, options): Promise<boolean>;
showIframe(__namedParameters): Promise<any>;
showOrientationOverlay(orientationRequired): void;
showPreAdCountdownOverlay(): void;
showPreAdCountdownOverlayFinish(wasInFullscreen): Promise<any>;
showRewardedFailedOverlay(): Promise<any>;
unlockAchievement(achievement): void;
}
Type declaration
changeAvatarGenerator:function
- changeAvatarGenerator(avatarGenerator): void
Returns void
changeLanguage:function
- changeLanguage(lang): Promise<void>
Returns Promise<void>
close:function
- close(): Promise<void>
Returns Promise<void>
closeOrientationOverlay:function
- closeOrientationOverlay(): void
Returns void
closePreAdCountdownOverlay:function
- closePreAdCountdownOverlay(): void
Returns void
closePreAdCountdownOverlayFinish:function
- closePreAdCountdownOverlayFinish(): void
Returns void
closeRewardedFailedOverlay:function
- closeRewardedFailedOverlay(): void
Returns void
login:function
- login(options?): Promise<{
secretCode?: string;
type: string;
}> Parameters
- options: {
withSecretCode?: boolean;
} = {}Optional
withSecretCode?: boolean
Returns Promise<{
secretCode?: string;
type: string;
}>
openAchievements:function
- openAchievements(achievementsInfo, __namedParameters?): Promise<void>
Parameters
- achievementsInfo: FetchPlayerAchievementsOutput
- __namedParameters: {
scrollTo?: string | number;
} = {}Optional
scrollTo?: string | number
Returns Promise<void>
openChat:function
- openChat(channel, channelMessages, personalChannelData?): Promise<void>
Parameters
- channel: Channel
- channelMessages: FetchOutput<ChannelMessage>
Optional
personalChannelData: PersonalChannelData
Returns Promise<void>
openDocument:function
- openDocument(document): Promise<void>
Returns Promise<void>
openGamesCollections:function
- openGamesCollections(gamesCollection): Promise<void>
Parameters
- gamesCollection: GamesCollection
Returns Promise<void>
openLeaderboard:function
- openLeaderboard(query, leaderbordInfo): Promise<void>
Parameters
- query: GetLeaderboardQuery
- leaderbordInfo: RatingData
Returns Promise<void>
openProductPurchase:function
- openProductPurchase(product): Promise<void>
Returns Promise<void>
pickPlayerOnConflict:function
- pickPlayerOnConflict(conflictInfo): Promise<PlayerState>
Parameters
- conflictInfo: Omit<PlayerSyncConflict, "__typename">
Returns Promise<PlayerState>
setSizeOffsets:function
- setSizeOffsets(sizeOffsets): void
Parameters
- sizeOffsets: {
bottom: number;
top: number;
}bottom: number
top: number
Returns void
setUnsupportedDeviceOverlay:function
- setUnsupportedDeviceOverlay(__namedParameters): void
Parameters
- __namedParameters: {
allowed: TargetOs[];
detected: TargetOs;
}allowed: TargetOs[]
detected: TargetOs
Returns void
share:function
- share(shareType, options): Promise<boolean>
Parameters
- shareType: ShareType
- options: ShareOptions
Returns Promise<boolean>
showIframe:function
- showIframe(__namedParameters): Promise<any>
Parameters
- __namedParameters: Omit<{
src: string;
title: string;
}, "transaction">
Returns Promise<any>
showOrientationOverlay:function
- showOrientationOverlay(orientationRequired): void
Parameters
- orientationRequired: GameOrientation
Returns void
showPreAdCountdownOverlay:function
- showPreAdCountdownOverlay(): void
Returns void
showPreAdCountdownOverlayFinish:function
- showPreAdCountdownOverlayFinish(wasInFullscreen): Promise<any>
Returns Promise<any>
showRewardedFailedOverlay:function
- showRewardedFailedOverlay(): Promise<any>
Returns Promise<any>
unlockAchievement:function
- unlockAchievement(achievement): void
Returns void
projectId
projectId: number
publicToken
publicToken: string
setBackground
setBackground: ((__namedParameters) => void) = setBackground
Type declaration
- (__namedParameters): void
Parameters
- __namedParameters: Partial<BackgroundSettings>
Returns void
Achievements manager