Skip to content

Commit ffe9e04

Browse files
authored
Docs update: Call to Acton + Video options (#49)
* Docs update: Call to Acton + Video options * Update README.md
1 parent b98ea78 commit ffe9e04

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/firebase-admob/README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ Through the use of NativeAdListener, you can listen for lifecycle events, such a
324324
<Label id="headLineView" />
325325
<ui:MediaView id="mediaView" height="100%"/>
326326
<Label id="bodyView" />
327+
<Button id="callToActionView" />
327328
</GridLayout>
328329
</ui:NativeAdView>
329330
```
@@ -337,8 +338,11 @@ loader.onAdEvent((event, error, data) => {
337338
const hlv = view.getViewById('headLineView');
338339
hlv.text = ad.headline;
339340
const mv = view.getViewById('mediaView');
340-
view.mediaView = mv;
341+
view.mediaView = mv;
341342
mv.mediaContent = ad.mediaContent;
343+
const but = view.getViewById('callToActionView');
344+
view.callToActionView = but;
345+
but.text = ad.callToAction;
342346
const bv = view.getViewById('bodyView');
343347
bv.text = ad.body;
344348
view.nativeAd = ad;
@@ -376,6 +380,19 @@ The [AdChoices overlay](https://developers.google.com/admob/android/native/advan
376380
`videoOptions`
377381

378382
Can be used to set video options for video assets returned as part of a native ad.
383+
```ts
384+
videoOptions?: {
385+
startMuted?: boolean;
386+
clickToExpandRequested?: boolean;
387+
customControlsRequested?: boolean;
388+
};
389+
```
390+
391+
Remember that if an ad contains a video, this video _must_ be shown.
392+
393+
```ts
394+
ad.mediaContent.hasVideoContent = true | false
395+
```
379396

380397
`mediaAspectRatio`
381398

0 commit comments

Comments
 (0)