-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathads.js
More file actions
27 lines (25 loc) · 675 Bytes
/
ads.js
File metadata and controls
27 lines (25 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { initYaGames } from './main.js';
export async function showFullscreenAdv() {
const ya = await initYaGames();
if (ya && ya.adv) {
try {
await ya.adv.showFullscreenAdv();
} catch (e) {
console.log('Fullscreen adv error', e);
}
} else {
console.log('Stub fullscreen adv');
}
}
export async function showRewarded() {
const ya = await initYaGames();
if (ya && ya.adv) {
try {
await ya.adv.showRewardedVideo({ callbacks: {} });
} catch (e) {
console.log('Rewarded error', e);
}
} else {
console.log('Stub rewarded video');
}
}