当前位置:网站首页>The problem of multiple callback of video ads stimulated by applets (offcolse problem)
The problem of multiple callback of video ads stimulated by applets (offcolse problem)
2022-06-25 00:24:00 【Mr, Guo】
The small program inspires the video advertisement to call back many times (offColse problem )
Developing tiktok applet ( The same is true for wechat applets ), Watch multiple ad videos , Back to repeat callback , Cause the problem of sending rewards repeatedly , Official documents demo Too simple , This place is a waste of time in self-development , break out Demo Let's avoid detours
let videoAd = tt.createRewardedVideoAd({
adUnitId: " Your advertisement id",
});
try{
if(videoAd.closeHandler){
videoAd.offClose(videoAd.closeHandler);
console.log("videoAd.offClose Uninstall successfully ");
}
} catch (e) {
console.log("videoAd.offClose Uninstall failed ");
console.error(e);
}
videoAd.closeHandler= function (res) {
// The user clicked 【 Close advertising 】 Button
if (res && res.isEnded || res === undefined) {
// End of normal playback , Game rewards can be distributed
console.log(" Play finished ");
} else {
// Close applet in advance
}
};
videoAd.onClose(videoAd.closeHandler);
边栏推荐
- Uniapp encapsulated incentive advertisement, screen insert advertisement and banner advertisement
- 微搭低代码中实现增删改查
- Transition from digitalization to intelligent manufacturing
- Jar package merging using Apache ant
- JDBC - database connection
- Android SQLite database
- C# Winform 最大化遮挡任务栏和全屏显示问题
- Use of JMeter easynmon
- [interview question] what is a transaction? What are dirty reads, unrepeatable reads, phantom reads, and how to deal with several transaction isolation levels of MySQL
- Domain Driven Design and coding
猜你喜欢
Why are life science enterprises on the cloud in succession?
Collective example
[leaderboard] Carla leaderboard leaderboard leaderboard operation and participation in hands-on teaching
Svg line animation background JS effect
How to quickly open traffic master for wechat applet
无人驾驶: 对多传感器融合的一些思考
In the past 5 years, from "Diandian" to the current test development, my success is worth learning from.
OTT营销之风正盛,商家到底该怎么投?
Human body transformation vs digital Avatar
How can I persuade leaders to use DDD to construct the liver project?
随机推荐
VIM use command
ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’
Encryption and encoding resolution
Hibernate learning 2 - lazy loading (delayed loading), dynamic SQL parameters, caching
Color gradient gradient color collection
无人驾驶: 对多传感器融合的一些思考
[distributed system design profile (2)] kV raft
【面试题】什么是事务,什么是脏读、不可重复读、幻读,以及MySQL的几种事务隔离级别的应对方法
Some examples of MgO operating database in go
Jar package merging using Apache ant
@mysql
Report on operation pattern and future prospect of global and Chinese propyl isovalerate industry from 2022 to 2028
Microsoft won the title of "leader" in the magic quadrant of Gartner industrial Internet of things platform again!
Modstart: embrace new technologies and take the lead in supporting laravel 9.0
VNC viewer remote connection raspberry pie without display
软件测试与游戏测试文章合集录
im即时通讯开发应用保活之进程防杀
Meta&伯克利基于池化自注意力机制提出通用多尺度视觉Transformer,在ImageNet分类准确率达88.8%!开源...
Unimportant tokens can be stopped in advance! NVIDIA proposes an efficient visual transformer network a-vit with adaptive token to improve the throughput of the model
[proteus simulation] example of using timer 0 as a 16 bit counter