Skip to main content

NativeMediaView

Renders the NativeMediaView used for displaying video & image assets of the ad.

import { NativeMediaView } from "react-native-admob-native-ads";

<NativeMediaView
style={{
width: "100%",
height: 250,
}}
/>;

props​

style:ViewStyle​

Style the outer NativeMediaView Component.

muted​

Mute/unmute the video.

TypeRequiredPlatform
booleannoAll

default:false

pause​

Pause/play the video

TypeRequiredPlatform
booleannoAll

default:false

Events​

onVideoStart​

Called when the video starts playing.

onVideoEnd​

Called when the video has ended.

onVideoPause​

Called when the video is paused.

onVideoPlay​

Called when the video starts playing.

onVideoProgress​

Returns with the duration and currentTime when the video is playing.

TypeRequiredPlatform
ProgressnoAll

Progress:{ duration: string, currentTime: string }

onVideoMute​

Called when the video is muted/unmuted. Returns current muted state.