Documentation Index
Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
Use this file to discover all available pages before exploring further.
Trusted Arbiter 会比较已加载的 CloudX 出价与受支持的第三方出价,并返回选中的平台。React Native 支持由 CloudX 原生 SDK 提供,支持 CloudX、Unity LevelPlay 和 PubMatic 出价输入。
使用各 SDK 已加载广告对象或广告信息对象来填充出价值:
import { CloudX, CloudXArbiterBid } from 'cloudx-react-native';
// cloudXAdInfo 是 CloudX 加载回调中的 CloudXAdInfo 对象。
// levelPlayAdInfo 是 Unity LevelPlay 广告信息对象。
// pubMaticPrice 和 pubMaticPartnerName 来自 PubMatic/OpenWrap 出价对象。
const result = await CloudX.arbiter({
bids: [
CloudXArbiterBid.cloudX(cloudXAdInfo),
CloudXArbiterBid.levelPlay({
networkName: levelPlayAdInfo.adNetwork,
revenue: levelPlayAdInfo.revenue,
precision: levelPlayAdInfo.precision,
}),
CloudXArbiterBid.pubMatic({
price: pubMaticPrice,
partnerName: pubMaticPartnerName,
}),
],
});
console.log('Selected platform:', result.platform);
如果 arbiter 服务不可用,SDK 会在传入的受支持出价中回退选择可比较美元出价最高的平台。