Implement Interactive Media Ads (IMA) SDK
This commit is contained in:
@@ -14,6 +14,11 @@ import {
|
||||
|
||||
import Video from 'react-native-video';
|
||||
|
||||
const adTagUrl = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/"
|
||||
+ "ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp"
|
||||
+ "&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite"
|
||||
+ "%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=";
|
||||
|
||||
class VideoPlayer extends Component {
|
||||
|
||||
state = {
|
||||
@@ -119,6 +124,7 @@ class VideoPlayer extends Component {
|
||||
onAudioBecomingNoisy={this.onAudioBecomingNoisy}
|
||||
onAudioFocusChanged={this.onAudioFocusChanged}
|
||||
repeat={false}
|
||||
adTagUrl={adTagUrl}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
|
||||
|
@@ -15,6 +15,11 @@ import {
|
||||
|
||||
import Video,{FilterType} from 'react-native-video';
|
||||
|
||||
const adTagUrl = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/"
|
||||
+ "ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp"
|
||||
+ "&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite"
|
||||
+ "%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=";
|
||||
|
||||
const filterTypes = [
|
||||
FilterType.NONE,
|
||||
FilterType.INVERT,
|
||||
@@ -266,6 +271,7 @@ class VideoPlayer extends Component {
|
||||
controls={this.state.controls}
|
||||
filter={this.state.filter}
|
||||
filterEnabled={this.state.filterEnabled}
|
||||
adTagUrl={adTagUrl}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.controls}>
|
||||
|
48
examples/basic/ios/Podfile
Normal file
48
examples/basic/ios/Podfile
Normal file
@@ -0,0 +1,48 @@
|
||||
# Uncomment the next line to define a global platform for your project
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'VideoPlayer' do
|
||||
# Comment the next line if you don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
|
||||
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
||||
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
|
||||
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
|
||||
pod 'React', :path => '../node_modules/react-native/'
|
||||
pod 'React-Core', :path => '../node_modules/react-native/'
|
||||
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
|
||||
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
|
||||
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
|
||||
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
|
||||
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
|
||||
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
|
||||
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
|
||||
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
|
||||
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
|
||||
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
|
||||
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
|
||||
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
|
||||
|
||||
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
|
||||
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
|
||||
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
|
||||
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
|
||||
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
|
||||
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
|
||||
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||
|
||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
# Pods for VideoPlayer
|
||||
pod 'react-native-video', :path => '../node_modules/react-native-video'
|
||||
end
|
||||
|
||||
target 'VideoPlayer-tvOS' do
|
||||
# Comment the next line if you don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
|
||||
# Pods for VideoPlayer-tvOS
|
||||
|
||||
end
|
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.9.0",
|
||||
"react-native": "0.60.5",
|
||||
"react-native": "0.61.5",
|
||||
"react-native-video": "file:../.."
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Reference in New Issue
Block a user