private void InitNetworkVideoAd() { XHLaunchAd.SetLaunchSourceType(SourceType.Image); XHLaunchAd.SetWaitDataDuration(5); XHLaunchVideoAdConfiguration videoAdConfiguration = XHLaunchVideoAdConfiguration.DefaultConfiguration; videoAdConfiguration.VideoNameOrURLString = "https://0.s3.envato.com/h264-video-previews/80fad324-9db4-11e3-bf3d-0050569255a8/490527.mp4"; videoAdConfiguration.Duration = 8; videoAdConfiguration.OpenModel = new NSString("https://www.baidu.com"); videoAdConfiguration.ShowEnterForeground = true; XHLaunchAd.VideoAdWithVideoAdConfiguration(videoAdConfiguration, this); }
private void InitNetworkImageAd() { XHLaunchAd.SetLaunchSourceType(SourceType.Image); XHLaunchAd.SetWaitDataDuration(5); XHLaunchImageAdConfiguration imageAdConfiguration = XHLaunchImageAdConfiguration.DefaultConfiguration; imageAdConfiguration.Duration = 5; imageAdConfiguration.Frame = new CoreGraphics.CGRect(0, 0, UIScreen.MainScreen.Bounds.Size.Width, UIScreen.MainScreen.Bounds.Height); imageAdConfiguration.ImageNameOrURLString = "https://upload-images.jianshu.io/upload_images/4421101-1301dea142ae4bd2.png"; imageAdConfiguration.ContentMode = UIViewContentMode.ScaleAspectFill; imageAdConfiguration.GIFImageCycleOnce = true; imageAdConfiguration.ImageOption = XHLaunchAdImageOptions.Default; imageAdConfiguration.ShowFinishAnimate = ShowFinishAnimate.FlipFromLeft; imageAdConfiguration.ShowFinishAnimateTime = 0.8f; imageAdConfiguration.SkipButtonType = SkipType.TimeText; imageAdConfiguration.ShowEnterForeground = true; imageAdConfiguration.OpenModel = new NSString("https://www.baidu.com"); XHLaunchAd.ImageAdWithImageAdConfiguration(imageAdConfiguration, this); }