[admob] Support 11.0 VideoController methods

This commit is contained in:
Elliot Hesp
2017-06-20 12:19:26 +01:00
parent 02be8a0d84
commit 54bf957cb3
9 changed files with 160 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { View, requireNativeComponent } from 'react-native';
import { ViewPropTypes, requireNativeComponent } from 'react-native';
import PropTypes from 'prop-types';
import { statics } from './';
import { nativeToJSError } from '../../utils';
@@ -10,7 +10,7 @@ import VideoOptions from './VideoOptions';
class AdMobComponent extends React.Component {
static propTypes = {
...View.propTypes,
...ViewPropTypes,
// TODO ehesp: cant init this outside of the component; statics isn't defined
...(() => {
@@ -60,6 +60,7 @@ class AdMobComponent extends React.Component {
* @param nativeEvent
*/
onBannerEvent = ({ nativeEvent }) => {
console.log('EVENT', nativeEvent)
if (this.props[nativeEvent.type]) {
if (nativeEvent.type === 'onAdFailedToLoad') {
const { code, message } = nativeEvent.payload;