JWPlayer React Native SDK安卓端预卷广告无法播放(错误码402、20402)求助
JWPlayer React Native SDK安卓端预卷广告加载超时问题求助
安卓端使用JWPlayer React Native SDK时,预卷广告无法播放,出现以下错误:
Ad Error: VAST媒体文件加载超时(8秒)。 Code: 402, AdErrorCode: 20402
项目配置
React Native JWPlayer配置
const jwConfig = { license: 'JWP_LICENSE', // Not required to reproduce the issue preload: 'auto', autostart: true, title: 'Single Inline Linear Preroll', playlist: [ { title: 'Single Inline Linear Preroll', file: 'https://content.bitsontherun.com/videos/q1fx20VZ-52qL9xLP.mp4', adschedule: { adBreak1: { offset: 'pre', ad: { source: 'googima', tag: 'https://video.doubleverify.com/tester/fixtures/vast/vast3.xml', }, }, }, }, ], advertising: { client: 'googima', }, };
Android build.gradle配置
buildscript { ext { buildToolsVersion = "34.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "25.1.8937393" kotlinVersion = "1.8.0" RNJWPlayerUseGoogleIMA = true } repositories { google() mavenCentral() maven { url 'https://mvn.jwplayer.com/content/repositories/releases/' } } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") } allprojects { repositories { mavenLocal() google() mavenCentral() maven { url 'https://mvn.jwplayer.com/content/repositories/releases/' } } } }
错误日志
[DEBUG] onPlayerAdError: { error: 'Ad Error: VAST media file loading reached a timeout of 8 seconds.', code: 402, adErrorCode: 20402, message: 'onPlayerAdError' }
已通过可直接运行的仓库jwplayer-ads-issue测试该问题,同时更换过其他有效广告标签和视频文件,问题仍然存在。求解决方法。
内容的提问来源于stack exchange,提问作者sosick
相关产品推荐
相关产品推荐

