npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-admob-baidu

v1.0.13

Published

Cordova Plugin for Baidu MSSP Ads

Downloads

17

Readme

Baidu Admob for MSSP / Cordova Plugin

release platforms qq

通过 Javascript 调用百度广告联盟(MSSP)SDK 接口,渲染广告内容

官方 SDK 下载:

NPM

https://www.npmjs.com/package/cordova-plugin-admob-baidu

Installation

通过 Cordova Plugins 安装

$ cordova plugin add cordova-plugin-admob-baidu

通过 URL 安装

$ cordova plugin add https://github.com/liangyongxiong/cordova-plugin-admob-baidu.git

Usage

YOUR_APP_ID : 应用媒体ID

YOUR_POSITION_ID : 广告位ID

横幅广告(Banner)

align : 显示位置(top-顶部,bottom-底部)

var banner = cordova.BaiduAdMob.BannerAd.show({
    app: YOUR_APP_ID,
    position: YOUR_POSITION_ID,
    align: 'bottom',
}).addEventListener('onSuccess', function(event) {
    console.log('Baidu AdMob banner onSuccess');
    setTimeout(function() {
        banner.hide();
    }, 3000);
}).addEventListener('onError', function(event) {
    console.log('Baidu AdMob banner onError');
}).addEventListener('onClose', function(event) {
    console.log('Baidu AdMob banner onClose');
}).addEventListener('onClick', function(event) {
    console.log('Baidu AdMob banner onClick');
});

插屏广告(Interstitial)

type : 插屏类型(1-其它,2-视频播放前倒计时,3-视频播放中暂停)

var interstitial = cordova.BaiduAdMob.InterstitialAd.show({
    app: YOUR_APP_ID,
    position: YOUR_POSITION_ID,
    type: 3,
}).addEventListener('onSuccess', function(event) {
    console.log('Baidu AdMob interstitial onSuccess');
    setTimeout(function() {
        interstitial.hide();
    }, 5000);
}).addEventListener('onError', function(event) {
    console.log('Baidu AdMob interstitial onError');
}).addEventListener('onClose', function(event) {
    console.log('Baidu AdMob interstitial onClose');
}).addEventListener('onClick', function(event) {
    console.log('Baidu AdMob interstitial onClick');
});

开屏广告(Splash)

bottom : 底部填充区域,包括图片路径和填充区域高度(单位:dp)

var splash = cordova.BaiduAdMob.SplashAd.show({
    app: YOUR_APP_ID,
    position: YOUR_POSITION_ID,
    bottom: {
        image: 'images/bottom.jpg',
        height: 120,
    },
}).addEventListener('onSuccess', function(event) {
    console.log('Baidu AdMob splash onSuccess');
}).addEventListener('onError', function(event) {
    console.log('Baidu AdMob splash onError');
}).addEventListener('onClose', function(event) {
    console.log('Baidu AdMob splash onClose');
}).addEventListener('onClick', function(event) {
    console.log('Baidu AdMob splash onClick');
});

Feeds联盟(Feeds)

cordova.BaiduAdMob.FeedsAd.url({
    app: YOUR_APP_ID,
    channel: YOUR_CHANNEL_ID
}).addEventListener('onSuccess', function(event) {
    console.log('Baidu AdMob feeds onSuccess');

    // Feeds联盟接入URL
    alert(event.url);
}).addEventListener('onError', function(event) {
    console.log('Baidu AdMob feeds onError');
});

FAQ

Empty

Support

Contribute

Please contribute! Look at the issues.

License

This project is licensed under MIT.