我正在使用cocos 2d中的vungle视频集成并成功运行广告。 在应用程序中我想提供观看视频的一些点...我可以设置..但问题是如何检查用户是否观看了视频或关闭它..
我正在使用上述帮助..但无法使其正常工作。请帮助我检查应用是否广告已关闭或完全关注
答案 0 :(得分:0)
几个月前我确实使用了丛林。检查以下代码,这对我有用
-(void)vungleMoviePlayed:(VGPlayData*)playData
{
if(playData.movieTotal == playData.movieViewed)
{
printf("Video fully watched\n");
mSeenVungleVideo = true;
}
else
{
printf("Player aborted video at middle\n");
}
}
答案 1 :(得分:0)
自从NatureFriend回答以来,这似乎已经发生了变化。现在是:
- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary*)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet;
{
// video done here.
}
此时它可能会显示“产品说明书”。如果您想知道何时关闭,您可以实现此委托:
- (void)vungleSDKwillCloseProductSheet:(id)productSheet
{
// product sheet closed here
}
答案 2 :(得分:0)
- (void)vungleSDKwillCloseAdWithViewInfo:(NSDictionary *)viewInfo willPresentProductSheet:(BOOL)willPresentProductSheet {
//Verify that the view was completed before rewarding the user
BOOL completedView = [[viewInfo valueForKey:@"completedView"] boolValue];
if (completedView) {
//View was successfully completed, do your stuff...
}
}