Hi, I am working on integrating AdMob natively into my application. I am trying to create a full page video ad experience with custom play/mute overlays.
I set both requestCustomMuteThisAd to "true" and customControlsRequested to "true"; however, when the Ad is being served I still see those buttons appear on the Ad. Further more when I toggle mute using the below command, the video Ad doesn't respect the setting and just keeps playing unmuted/muted based on the explicit controls of the video.
await MobileAds.instance.setAppMuted(isMute);
I have also tried below, with no luck
if (isMute) {
await MobileAds.instance.setAppVolume(0);
} else {
await MobileAds.instance.setAppVolume(1);
}
Sample ad, showing all the play controls even tho I requested to use custom controls, as well as sound not working regardless of what the global mute setting is.
This is my current Ad initialization:
_nativeAd = NativeAd(
adUnitId: _adUnitId,
factoryId: "myNativeAdFactory",
nativeAdOptions: NativeAdOptions(
adChoicesPlacement: AdChoicesPlacement.bottomRightCorner,
mediaAspectRatio: MediaAspectRatio.any,
requestCustomMuteThisAd: true,
videoOptions: VideoOptions(
clickToExpandRequested: false,
customControlsRequested: true,
)),
listener: NativeAdListener(onAdLoaded: (ad) {
Logger.instance.info(message: '$NativeAd loaded.');
setState(() {
_nativeAdIsLoaded = true;
});
}, onAdFailedToLoad: (ad, error) {
// Dispose the ad here to free resources.
Logger.instance.warn(message: '$NativeAd failed to load: $error');
ad.dispose();
}, onAdImpression: (ad) {
Logger.instance.info(message: '$NativeAd impression achieved.');
}, onAdClosed: (ad) {
Logger.instance.debug(message: '$NativeAd ad closed.');
}),
request: const AdRequest(),
)..load();