根据JWplayer文档,这应该可以工作,但是播放广告时我看不到任何跳过按钮。

//ad config
JWAdConfig *adConfig = [JWAdConfig new];
adConfig.adMessage = @"Ad duration countdown xx";
adConfig.skipMessage = @"Skip in xx";
adConfig.skipText = @"Move on";
adConfig.skipOffset = 3;
adConfig.adClient = vastPlugin;
config.adConfig = adConfig;

还询问JWplayer:https://support.jwplayer.com/customer/en/portal/questions/16078471-skipping-ad-on-ios-doesn-t-work?new=16078471

@Max Mikheyenko-广告网址:
NSString *appBundle = @"myBundleName";
NSString *appDomain = @"myDomainName";
NSString *appName = @"myAppName";

NSString *adUrl = [NSString stringWithFormat:@"http://search.myadurl.com/vast/2.0/myadurlid?VPAID=JS&app[name]=%@&app[domain]=%@&app[bundle]=%@&device[ifa]=%@", appName, appDomain, appBundle, kGaPropertyId];

config.adSchedule = @[[JWAdBreak adBreakWithTag:adUrl offset:@"pre"]];

@Max Mikheyenko-VPAID = js

JWplayer最近告诉我的同事(他正在为Android实现相同的功能),应用中的JW播放器不支持VPAID 2.0(JS),并要求他通过将VPAID = js替换为VPI = MP4来更改URL。

最近更新:我再次尝试使用VPI = MP4进行尝试,现在出现此错误
2016-01-10 15:05:07.346 [21:285288] AD ERROR {
    adposition = pre;
    client = vast;
    code = 101;
    event = onAdError;
    message = "Ad Tag Empty";

马克斯·米赫延科(Max Mikheyenko)

VPI = MP4现在可以正常工作,用VPI = MP4替换VPAID = JS时,我不小心在URL中添加了美元符号

最佳答案

使用VPI = MP4可以正常工作!

VPAID = JS确实适用于iOS,但没有跳过按钮,并且VPI = MP4现在显示了跳过按钮。

08-24 20:24