Skip to content

Commit

Permalink
Merge pull request #57 from basil79/prepare-3rd-party
Browse files Browse the repository at this point in the history
refactoring, rename destroy() to abort(), and added destroy()
  • Loading branch information
basil79 authored Aug 23, 2022
2 parents 0b2e239 + 578ccfb commit 4a13ea6
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 176 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ adsManager.addEventListener('AdsManagerLoaded', function() {
// AdError
adsManager.addEventListener('AdError', function(adError) {
if(adsManager) {
adsManager.destroy();
// abort anything that currenlty doing on with AdsManager
// and reset to a default state
adsManager.abort();
}
// ...
});
Expand Down
4 changes: 2 additions & 2 deletions public/js/ads-manager.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions public/js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
//(function() {

// var playButton = document.getElementById('play-button');
var testAdButton = document.getElementById('test-ad-button');
Expand Down Expand Up @@ -55,7 +55,9 @@
appendEvent('AdError : ' + adError);

if(adsManager) {
adsManager.destroy();
// abort anything that currenlty doing on with AdsManager
// and reset to a default state
adsManager.abort();
}

isAdPaused = false;
Expand Down Expand Up @@ -281,4 +283,4 @@
clearEvents();
}, false);

})()
//})()
Loading

0 comments on commit 4a13ea6

Please sign in to comment.