|
6 | 6 | */ |
7 | 7 | (function(){ |
8 | 8 |
|
| 9 | +/* commonjs package manager support (eg componentjs) */ |
| 10 | +if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ |
| 11 | + module.exports = 'ngCordova'; |
| 12 | +} |
| 13 | + |
9 | 14 | angular.module('ngCordova', [ |
10 | 15 | 'ngCordova.plugins' |
11 | 16 | ]); |
@@ -5314,112 +5319,6 @@ angular.module('ngCordova.plugins.localNotification', []) |
5314 | 5319 | }; |
5315 | 5320 | }]); |
5316 | 5321 |
|
5317 | | -// install : cordova plugin add https://github.com/floatinghotpot/cordova-plugin-mmedia.git |
5318 | | -// link : https://github.com/floatinghotpot/cordova-plugin-mmedia |
5319 | | - |
5320 | | -angular.module('ngCordova.plugins.mMediaAds', []) |
5321 | | - |
5322 | | - .factory('$cordovaMMediaAds', ['$q', '$window', function ($q, $window) { |
5323 | | - |
5324 | | - return { |
5325 | | - setOptions: function (options) { |
5326 | | - var d = $q.defer(); |
5327 | | - |
5328 | | - $window.mMedia.setOptions(options, function () { |
5329 | | - d.resolve(); |
5330 | | - }, function () { |
5331 | | - d.reject(); |
5332 | | - }); |
5333 | | - |
5334 | | - return d.promise; |
5335 | | - }, |
5336 | | - |
5337 | | - createBanner: function (options) { |
5338 | | - var d = $q.defer(); |
5339 | | - |
5340 | | - $window.mMedia.createBanner(options, function () { |
5341 | | - d.resolve(); |
5342 | | - }, function () { |
5343 | | - d.reject(); |
5344 | | - }); |
5345 | | - |
5346 | | - return d.promise; |
5347 | | - }, |
5348 | | - |
5349 | | - removeBanner: function () { |
5350 | | - var d = $q.defer(); |
5351 | | - |
5352 | | - $window.mMedia.removeBanner(function () { |
5353 | | - d.resolve(); |
5354 | | - }, function () { |
5355 | | - d.reject(); |
5356 | | - }); |
5357 | | - |
5358 | | - return d.promise; |
5359 | | - }, |
5360 | | - |
5361 | | - showBanner: function (position) { |
5362 | | - var d = $q.defer(); |
5363 | | - |
5364 | | - $window.mMedia.showBanner(position, function () { |
5365 | | - d.resolve(); |
5366 | | - }, function () { |
5367 | | - d.reject(); |
5368 | | - }); |
5369 | | - |
5370 | | - return d.promise; |
5371 | | - }, |
5372 | | - |
5373 | | - showBannerAtXY: function (x, y) { |
5374 | | - var d = $q.defer(); |
5375 | | - |
5376 | | - $window.mMedia.showBannerAtXY(x, y, function () { |
5377 | | - d.resolve(); |
5378 | | - }, function () { |
5379 | | - d.reject(); |
5380 | | - }); |
5381 | | - |
5382 | | - return d.promise; |
5383 | | - }, |
5384 | | - |
5385 | | - hideBanner: function () { |
5386 | | - var d = $q.defer(); |
5387 | | - |
5388 | | - $window.mMedia.hideBanner(function () { |
5389 | | - d.resolve(); |
5390 | | - }, function () { |
5391 | | - d.reject(); |
5392 | | - }); |
5393 | | - |
5394 | | - return d.promise; |
5395 | | - }, |
5396 | | - |
5397 | | - prepareInterstitial: function (options) { |
5398 | | - var d = $q.defer(); |
5399 | | - |
5400 | | - $window.mMedia.prepareInterstitial(options, function () { |
5401 | | - d.resolve(); |
5402 | | - }, function () { |
5403 | | - d.reject(); |
5404 | | - }); |
5405 | | - |
5406 | | - return d.promise; |
5407 | | - }, |
5408 | | - |
5409 | | - showInterstitial: function () { |
5410 | | - var d = $q.defer(); |
5411 | | - |
5412 | | - $window.mMedia.showInterstitial(function () { |
5413 | | - d.resolve(); |
5414 | | - }, function () { |
5415 | | - d.reject(); |
5416 | | - }); |
5417 | | - |
5418 | | - return d.promise; |
5419 | | - } |
5420 | | - }; |
5421 | | - }]); |
5422 | | - |
5423 | 5322 | // install : cordova plugin add cordova-plugin-media |
5424 | 5323 | // link : https://github.com/apache/cordova-plugin-media |
5425 | 5324 |
|
@@ -5563,6 +5462,112 @@ angular.module('ngCordova.plugins.media', []) |
5563 | 5462 | }; |
5564 | 5463 | }]); |
5565 | 5464 |
|
| 5465 | +// install : cordova plugin add https://github.com/floatinghotpot/cordova-plugin-mmedia.git |
| 5466 | +// link : https://github.com/floatinghotpot/cordova-plugin-mmedia |
| 5467 | + |
| 5468 | +angular.module('ngCordova.plugins.mMediaAds', []) |
| 5469 | + |
| 5470 | + .factory('$cordovaMMediaAds', ['$q', '$window', function ($q, $window) { |
| 5471 | + |
| 5472 | + return { |
| 5473 | + setOptions: function (options) { |
| 5474 | + var d = $q.defer(); |
| 5475 | + |
| 5476 | + $window.mMedia.setOptions(options, function () { |
| 5477 | + d.resolve(); |
| 5478 | + }, function () { |
| 5479 | + d.reject(); |
| 5480 | + }); |
| 5481 | + |
| 5482 | + return d.promise; |
| 5483 | + }, |
| 5484 | + |
| 5485 | + createBanner: function (options) { |
| 5486 | + var d = $q.defer(); |
| 5487 | + |
| 5488 | + $window.mMedia.createBanner(options, function () { |
| 5489 | + d.resolve(); |
| 5490 | + }, function () { |
| 5491 | + d.reject(); |
| 5492 | + }); |
| 5493 | + |
| 5494 | + return d.promise; |
| 5495 | + }, |
| 5496 | + |
| 5497 | + removeBanner: function () { |
| 5498 | + var d = $q.defer(); |
| 5499 | + |
| 5500 | + $window.mMedia.removeBanner(function () { |
| 5501 | + d.resolve(); |
| 5502 | + }, function () { |
| 5503 | + d.reject(); |
| 5504 | + }); |
| 5505 | + |
| 5506 | + return d.promise; |
| 5507 | + }, |
| 5508 | + |
| 5509 | + showBanner: function (position) { |
| 5510 | + var d = $q.defer(); |
| 5511 | + |
| 5512 | + $window.mMedia.showBanner(position, function () { |
| 5513 | + d.resolve(); |
| 5514 | + }, function () { |
| 5515 | + d.reject(); |
| 5516 | + }); |
| 5517 | + |
| 5518 | + return d.promise; |
| 5519 | + }, |
| 5520 | + |
| 5521 | + showBannerAtXY: function (x, y) { |
| 5522 | + var d = $q.defer(); |
| 5523 | + |
| 5524 | + $window.mMedia.showBannerAtXY(x, y, function () { |
| 5525 | + d.resolve(); |
| 5526 | + }, function () { |
| 5527 | + d.reject(); |
| 5528 | + }); |
| 5529 | + |
| 5530 | + return d.promise; |
| 5531 | + }, |
| 5532 | + |
| 5533 | + hideBanner: function () { |
| 5534 | + var d = $q.defer(); |
| 5535 | + |
| 5536 | + $window.mMedia.hideBanner(function () { |
| 5537 | + d.resolve(); |
| 5538 | + }, function () { |
| 5539 | + d.reject(); |
| 5540 | + }); |
| 5541 | + |
| 5542 | + return d.promise; |
| 5543 | + }, |
| 5544 | + |
| 5545 | + prepareInterstitial: function (options) { |
| 5546 | + var d = $q.defer(); |
| 5547 | + |
| 5548 | + $window.mMedia.prepareInterstitial(options, function () { |
| 5549 | + d.resolve(); |
| 5550 | + }, function () { |
| 5551 | + d.reject(); |
| 5552 | + }); |
| 5553 | + |
| 5554 | + return d.promise; |
| 5555 | + }, |
| 5556 | + |
| 5557 | + showInterstitial: function () { |
| 5558 | + var d = $q.defer(); |
| 5559 | + |
| 5560 | + $window.mMedia.showInterstitial(function () { |
| 5561 | + d.resolve(); |
| 5562 | + }, function () { |
| 5563 | + d.reject(); |
| 5564 | + }); |
| 5565 | + |
| 5566 | + return d.promise; |
| 5567 | + } |
| 5568 | + }; |
| 5569 | + }]); |
| 5570 | + |
5566 | 5571 | // install : cordova plugin add https://github.com/floatinghotpot/cordova-mobfox-pro.git |
5567 | 5572 | // link : https://github.com/floatinghotpot/cordova-mobfox-pro |
5568 | 5573 |
|
|
0 commit comments