新しい Brightcove iOS SDK の BCPlayerView / BCVideo / BCPlayerItem 内で広告への呼び出しを実装する方法を知っている人はいますか? 広告サーバーはどこで指定できますか? これは Brightcove Studio で行う必要がありますか?
1 に答える
1
3.0 の Brightcove iOS プレーヤには、現在、広告の統合が組み込まれていません。ブライトコーブで構成された広告ポリシーは、現在 Web ベースのプレーヤでのみ利用できるため、その広告構成を iOS アプリに統合するには、自分で作業を行う必要があります。
そのためには、広告パートナーから iOS ライブラリを取得し、Studio から広告構成を取得する必要があります。次に、広告を表示するキュー ポイントを設定できます。
// create a "before" cue point to play a pre-roll advertisement
BCCuePoint *cuePoint = [BCCuePoint
cuePointWithPosition:@"before"
type:@"ad"
properties:@{ @"adId": @"some-ad-configuration" }];
[emitter emit:BCEventSetCuePoint withDetails:@{ @"cuePoint": cuePoint }];
広告を表示する前に、そのキュー ポイントをリッスンします。
// Listen for a cue point to trigger an ad
[player.playbackEmitter on:BCEventCuePoint callBlock:^(BCEvent *event) {
// Grab the cue point from the event
BCCuePoint *cuePoint = [event.details objectForKey:@"cuePoint"];
if ([cuePoint.type isEqualToString:@"ad"]) {
[player pause];
// Here's where you would call your native ad library to play an ad
// This code will vary a lot depending on what ad library you're using
[adLibrary playAd:cuePoint.properties[@"adId"]];
}
}];
ビルド済みの IMA および FreeWheel プラグインが準備中なので、これらのプロバイダーのいずれかを使用しているかどうかを確認する価値があります。
于 2012-10-25T18:23:32.557 に答える