0% found this document useful (0 votes)
466 views6 pages

Vungle MRAID SDK Error Handling Guide

This document defines functions and constants related to the Vungle mobile advertising SDK. It includes definitions for error codes, MRAID events and properties, and functions for broadcasting events and validating property updates. The core functions allow initializing event listeners, getting and setting MRAID property values, and notifying listeners of events or errors.

Uploaded by

Walison Silva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
466 views6 pages

Vungle MRAID SDK Error Handling Guide

This document defines functions and constants related to the Vungle mobile advertising SDK. It includes definitions for error codes, MRAID events and properties, and functions for broadcasting events and validating property updates. The core functions allow initializing event listeners, getting and setting MRAID property values, and notifying listeners of events or errors.

Uploaded by

Walison Silva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

!function(n){"use strict";[Link]=[Link]||{}}(window);!

function(e){var
t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:
{}};return e[n].call([Link],o,[Link],r),o.l=!
0,[Link]}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||[Link](e,t,
{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof
Symbol&&[Link]&&[Link](e,[Link],
{value:"Module"}),[Link](e,"__esModule",{value:!
0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof
e&&e&&e.__esModule)return e;var
n=[Link](null);if(r.r(n),[Link](n,"default",{enumerable:!
0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return
e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function()
{return [Link]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t)
{return [Link](e,t)},r.p="",r(r.s=0)}
([function(e,t,r){"use strict";r.r(t);r(1),r(2),r(3),r(4)},function(e,t){!
function(e){"use strict";var t,r=[Link]=[Link]||{};[Link]||
((t=[Link]=[Link]||{}).bridgeError={BRG000:"Missing command in
[Link] method call!",BRG001:"Vungle SDK is not ready to
process MRAID command!"},[Link]={BRX000:"Cannot retrieve #dynamic
container in Ad Unit!"},[Link]={MRD000:"Cannot add listener for unknown MRAID
event!",MRD001:"Missing argument(s)! Both event and/or listener are required for
method call!",MRD002:"Unable to find listener registered for
event!",MRD003:"Missing MRAID event! Cannot remove event listener!",MRD004:"Missing
object! An expand properties object is required for method call!",MRD005:"Missing
object! An orientation properties object is required for method
call!",MRD006:"Missing object! An resize properties object is required for method
call!",MRD007:"Missing URL! A URL is required for method call!",MRD008:"Ad unit is
hidden and cannot be closed!",MRD009:"Missing URL! A video/caption URL is required
for method call!",MRD010:"Ad Unit is not viewable! Please make sure isViewAble is
set to true!",MRD011:"Ad unit can only be expanded from the default or resized
state!",MRD012:"Ad unit can only be resized from the default or resized
state!",MRD013:"Missing URI! A valid URI is required for method
call!",MRD015:"Invalid data/type detected when updating MRAID
properties!",MRD016:"Missing app store id! An app store id is required for method
call!"},[Link]={MRC000:"MRAID SDK error detected!",MRC001:"Missing
MRAID object in window!",MRC002:"Missing video URL! [Link] cannot
retrieve video URL from arguments!"},[Link]={ADT000:"Missing page
template JavaScript!",ADT001:"Error encountered loading template
configuration!"},[Link]={GET000:"Cannot serialize user interaction
tracking event object!"})}(window)},function(e,t){!function(e){"use strict";var
t=[Link]=[Link]||{},r=[Link]=[Link]||{},n=[Link]=[Link]||
[];n&&[Link]("[Link] loaded."),[Link]={versions:
{V1:"1.0",V2:"2.0"},states:
{LOADING:"loading",DEFAULT:"default",RESIZED:"resized",EXPANDED:"expanded",HIDDEN:"
hidden"},events:
{INFO:"info",READY:"ready",ERROR:"error",STATE_CHANGE:"stateChange",ORIENTATION_CHA
NGE:"orientationChange",VIEWABLE_CHANGE:"viewableChange",SIZE_CHANGE:"sizeChange"},
placements:
{UNKNOWN:"unknown",INLINE:"inline",INTERSTITIAL:"interstitial"},orientations:
{PORTRAIT:"portrait",LANDSCAPE:"landscape",NONE:"none"},closePositions:
{CENTER:"center",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-
right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-
center",BOTTOM_RIGHT:"bottom-right"}},[Link]=function(e){var
t=function(e){var t;return e&&"object"==typeof e?
(t={},[Link](e).forEach(function(r)
{t[r]=e[r]})):t=e,t};[Link]=t(e),[Link]=function(){return
t([Link])},[Link]=function(e){if(e&&"object"==typeof e){var
t=this;[Link](e).forEach(function(r){[Link][r]=e[r]})}else
[Link]=e}},[Link]=function(e){var
t={};[Link]=e,[Link]=0,[Link]=function(e){var r=String(e);return!
t[r]&&(t[r]=e,[Link]++,!0)},[Link]=function(e){var
r=String(e);return!(![Link](r)||!t[r])&&(t[r]=null,delete
t[r],[Link]--,!0)},[Link]=function(){var
e=this;[Link](t).forEach(function(r)
{[Link](t[r])})},[Link]=function(e){var
r=this;[Link](t).forEach(function(n){t[n].apply([Link],e)})}};var o=new
[Link]([Link].V1),i=new
[Link]({width:0,height:0}),a=new
[Link]({width:0,height:0}),s=new
[Link]({x:0,y:0,width:0,height:0}),c=new
[Link]({x:0,y:0,width:0,height:0}),d=new
[Link]({width:0,height:0,useCustomClose:!1,isModal:!0}),u=new
[Link]({width:0,height:0,offsetX:0,offsetY:0,customClosePosition:r
.[Link].TOP_RIGHT,allowOffscreen:!0}),l=new
[Link]({allowOrientationChange:!
0,forceOrientation:[Link]}),p=new
[Link]({[Link]
1}),m=new [Link]([Link]),f=new
[Link]([Link]),g=new
[Link](!1),E=new [Link](!1),v=new
[Link](!1),y=new [Link](!1),R=new
[Link](!1),h=new [Link](!1),C=new
[Link](!1),x=new [Link](!1),D=new
[Link](!1),b=new [Link](!1),B={},P=new
[Link](""),O=new
[Link]("");[Link]=B,[Link]={os:
{update:function(e){[Link](e)},clone:function(){return [Link]()}},osVersion:
{update:function(e){[Link](e)},clone:function(){return [Link]()}},incentivized:
{update:function(e){[Link](e)},clone:function(){return
[Link]()}},consentRequired:{update:function(e){[Link](e)},clone:function()
{return [Link]()}},consentTitleText:{update:function(e)
{[Link](e)},clone:function(){return [Link]()}},consentBodyText:
{update:function(e){[Link](e)},clone:function(){return
[Link]()}},consentAcceptButtonText:{update:function(e)
{[Link](e)},clone:function(){return [Link]()}},consentDenyButtonText:
{update:function(e){[Link](e)},clone:function(){return [Link]()}},version:
{update:function(e){[Link](e),[Link]([Link],"Setting
MRAID version to: "+String(e))},clone:function(){return [Link]()}},maxSize:
{update:function(e)
{[Link](e),[Link](e),[Link]([Link],"Setting maxSize to:
"+String(e))},clone:function(){return [Link]()}},screenSize:{update:function(e)
{var t;[Link](e),t=[Link](),[Link]([Link],"Setting
screenSize to:
"+String(e)),[Link]([Link].SIZE_CHANGE,[Link],[Link])},clone:
function(){return [Link]()}},defaultPosition:{update:function(e)
{[Link](e),[Link]([Link],"Setting defaultPosition to:
"+String(e))},clone:function(){return [Link]()}},currentPosition:
{update:function(e){[Link](e),[Link]([Link],"Setting
currentPosition to: "+String(e))},clone:function(){return
[Link]()}},expandProperties:{update:function(e)
{[Link](e),[Link]([Link],"Setting expandProperties to:
"+String(e))},clone:function(){return [Link]()}},resizeProperties:
{update:function(e){[Link](e),[Link]([Link],"Setting
resizeProperties to: "+String(e))},clone:function(){return
[Link]()}},orientationProperties:{update:function(e)
{[Link](e),[Link]([Link],"Setting orientationProperties
to: "+String(e))},clone:function(){return [Link]()}},supports:{update:function(e)
{[Link](e),[Link]([Link],"Setting supports to:
"+String(e))},clone:function(){return [Link]()}},state:{update:function(e)
{[Link](e),[Link]([Link],"Setting state to:
"+String(e)),[Link]([Link].STATE_CHANGE,[Link]()),[Link]()===r
.[Link]&&[Link]([Link])},clone:function()
{return [Link]()}},placementType:{update:function(e)
{[Link](e),[Link]([Link],"Setting placementType to:
"+String(e))},clone:function(){return [Link]()}},isViewable:{update:function(e)
{[Link](e),[Link]([Link],"Setting isViewable to:
"+String(e)),[Link]([Link].VIEWABLE_CHANGE,[Link]())},clone:fun
ction(){return [Link]()}},customClose:{update:function(e)
{[Link](e),[Link]([Link],"Setting useCustomClose to:
"+String(e))},clone:function(){return [Link]()}},customPrivacy:{update:function(e)
{[Link](e),[Link]([Link],"Setting useCustomPrivacy to:
"+String(e))},clone:function(){return [Link]()}},enableBackImmediately:
{update:function(e){[Link](e),[Link]([Link],"Setting
enableBackImmediately to: "+String(e))},clone:function(){return
[Link]()}}},[Link]=function(e,r,n){var o=!0;return typeof e!=typeof
r&&"useCustomClose"!==n?(o=!
1,[Link]&&[Link](["MRD015",n,e].join(":"))):"object
"==typeof e&&[Link](e).forEach(function(e){e in r||(o=!
1,[Link]&&[Link](["MRD015",n,e].join(":")))}),o},r.
broadcastEvent=function(){var
e=[Link](arguments),t=[Link](),r=B[t];r&&[Link](e)},[Link]
alidMARIDEvent=function(e){for(var t in
[Link])if([Link][t]===e)return!0;return!1}}
(window)},function(e,t){!function(e){"use strict";var t,r=[Link]=[Link]||
{},n=[Link]=[Link]||{},o=[Link]=[Link]||
{},i=[Link]=[Link]||[],a=!1,s=!1,c=[],d=!1,u=!1,l=!1,p=!
1,m=[Link],f=[Link],g=[Link]
nts;i&&[Link]("vungle.m
raidBridge loaded."),[Link]=function(t)
{[Link]=t},[Link]=function(e,t)
{i&&[Link]("[Link]:"+[Link](e)),[Link](e).
forEach(function(t){[Link][t]?
[Link][t].update(e[t]):[Link]("notifyProperties
Change","MRD015: Unhandled Property received - "+t+" - "+e[t])}),void 0!==t&&!
0===t&&[Link]("mraid://propertiesChangeCompleted")},[Link]
ete=function(){i&&[Link]("[Link]");var e="";[Link]?
(e=[Link](),[Link](e)):s=!1},[Link]=function(e)
{i&&[Link]("[Link]");var
n=[Link]();a=!0,void 0!==e?(d=!
0,p=[Link],l=[Link],u=[Link],t=e):[Link]
ySuccessfulViewAd(),n!==[Link]?
[Link]([Link]):m([Link])},[Link]
nt=function(e,t)
{i&&[Link]("[Link]:"+e+":"+t),m([Link],e,t)},[Link]
mand=function(){var e,t,o,d="";if(!a)throw
[Link](d,[Link].BRG001),
{name:"VungleMRAIDBridgeException",message:"BRG001"};if(!arguments)throw
[Link](d,[Link].BRG000),
{name:"VungleMRAIDBridgeException",message:"BRG000"};for(d+="mraid://"+arguments[0]
,o=1;o<[Link];o+=2)e=arguments[o],t=arguments[o+1],d+=(1===o?"?":"&")
+encodeURIComponent(e),void 0!==t&&(d+="="+encodeURIComponent(t));s?[Link](d):(s=!
0,[Link](d)),i&&[Link]("[Link]:
"+d)},[Link]=function(){return t},[Link]=function(){return
d},[Link]=function(){return u},[Link]=function(){return
l},[Link]=function(){return
p},[Link]=function(){return
[Link]()},[Link]
ent=function(){i&&[Link]("[Link]");var
t=[Link]("#dynamic"),r=new
[Link]("[Link]");t?
[Link](r):[Link]([Link].BRX000)},[Link]
pareStoreViewSuccess=function()
{i&&[Link]("[Link]");var
t=[Link]("#dynamic"),r=new
[Link]("[Link]");t?
[Link](r):[Link]([Link].BRX000)},[Link]
sentStoreViewFinished=function()
{i&&[Link]("[Link]");var
t=[Link]("#dynamic"),r=new
[Link]("[Link]");t?
[Link](r):[Link]([Link].BRX000)},[Link]
or=function(t)
{i&&[Link]("[Link]:"+t);try{[Link]("er
ror","code",t)}catch(t){"VungleMRAIDBridgeException"===[Link]?
i&&[Link]("%cVungleMRAIDBridgeException caught in [Link]!
Message: %s","color: red; font-size: x-
large",[Link][[Link]]):i&&[Link]("%cUnknown Exception caught
in [Link]! Message: %s","color: red; font-size: x-
large",[Link])}},[Link]=function(e)
{i&&[Link]("[Link]:"+e);try{[Link]
("tpat","event",e)}catch(e)
{[Link]("[Link]",[Link])}},[Link]
ction=function(e)
{i&&[Link]("[Link]:"+e);try{[Link]
and("consentAction","event",e)}catch(e)
{[Link]("[Link]",[Link])}},o.
notifyUserInteraction=function(e,t)
{i&&[Link]("[Link]");try{[Link]
and("action",e,t)}catch(e)
{[Link]("[Link]",[Link])}}
,[Link]=function(e,t)
{i&&[Link]("[Link]");var
n=e||"null",o=t||"null";try{[Link]("actionWithValue","even
t",n,"value",o)}catch(n)
{[Link]("[Link]",[Link]
e)}},o.playHTML5Video=function(e)
{i&&[Link]("mraidBridgeExt.playHTML5Video");try{[Link]("pl
ayHTML5Video","selector",e)}catch(e)
{[Link]("mraidBridgeExt.playHTML5Video",[Link])}},[Link]
Privacy=function(e)
{i&&[Link]("[Link]");try{[Link]("openP
rivacy","url",e)}catch(e)
{[Link]("[Link]",[Link])}},[Link]
MRAIDClose=function(){i&&[Link]("[Link]");try{var
e,t="windows"===[Link]()&&(0===[Link]().indexOf("WinPhon
e81")||
0===[Link]().indexOf("Win81")),n="android"===[Link]()&&p
arseInt([Link](),10)<=17;t||n?
(e=[Link]("Event")).initEvent("[Link]",!0,!
0):e=new Event("[Link]"),d?
[Link]("#dynamic").dispatchEvent(e):[Link]
("close")}catch(e)
{[Link]("[Link]",[Link])}},o.n
otifySuccessfulViewAd=function()
{i&&[Link]("[Link]");try{[Link]
mand("successfulView")}catch(e)
{[Link]("[Link]",[Link])}
},[Link]=function()
{i&&[Link]("[Link]");try{[Link]("o
penAppInDevice")}catch(e)
{[Link]("[Link]",[Link])}},[Link]
nStorePage=function()
{i&&[Link]("[Link]");try{[Link]("ope
nStorePage")}catch(e)
{[Link]("[Link]",[Link])}},[Link]
lDownload=function()
{i&&[Link]("[Link]");try{[Link]("ca
ncelDownload")}catch(e)
{[Link]("[Link]",[Link])}},[Link]
nstallationStatus=function(t){i&&[Link]("[Link]");var
r=[Link]("#dynamic"),n=new
[Link]("[Link]",{detail:t});r?
[Link](n):[Link]([Link].BRX000)},[Link]
loadAppOnDevice=function()
{i&&[Link]("[Link]");try{[Link]
ommand("startDownloadAppOnDevice")}catch(e)
{[Link]("[Link]",[Link]
)}}}(window)},function(e,t){!function(e){"use strict";var t=[Link]=[Link]||
{},r=[Link]=[Link]=[Link]||{},n=[Link]=[Link]||
{},o=[Link]=[Link]||
[],i=[Link],a=[Link],s=[Link]
pertiesHandlers,c=[Link],d=[Link],u=t.m
[Link],l=[Link];o&&[Link]("[Link]
loaded."),[Link]=function(e,r){e&&r?[Link](e)?
([Link][e]||([Link][e]=new
[Link](e)),[Link][e].add(r)):a([Link],"mra
[Link]",[Link].MRD000+":"+e):a([Link],"[Link]
ener",[Link].MRD001)},[Link]=function(e,r){var n,o=!1;e?
(n=[Link][e],r?(n&&(o=[Link](r)),o||
a([Link],"[Link]",[Link].MRD002+":"+e)):n&&[Link]
[Link](),n&&0===[Link]&&([Link][e]=null,
delete
[Link][e])):a([Link],"[Link]",[Link]
Error.MRD003)},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(e){var
r;"object"==typeof e?
(r=["setOrientationProperties","allowOrientationChange",[Link],"f
orceOrientation",[Link]],c(e,[Link](),"orientati
onProperties")&&([Link](e),[Link](null,r))):
(a([Link],"[Link]",[Link].MRD005),[Link]
eExt&&[Link]("MRD005"))},[Link]=function(e)
{var r={};"object"==typeof e?([Link](e).forEach(function(t){"isModal"!
==t&&(r[t]=e[t])}),c(r,[Link](),"expandProperties")&&[Link]
[Link](r)):
(a([Link],"[Link]",[Link].MRD004),[Link]&
&[Link]("MRD004"))},[Link]=function(e)
{"object"==typeof e?
c(e,[Link](),"resizeProperties")&&[Link](e):
(a([Link],"[Link]",[Link].MRD006),[Link]&
&[Link]("MRD006"))},[Link]=function(e){e?
i("open","url",encodeURI(e)):a([Link],"[Link]",[Link].MRD007)},r.c
lose=function(){[Link]()!==[Link]?
i("close"):a([Link],"[Link]",[Link].MRD008)},[Link]=function(e)
{var
r=[Link](),n=[Link](),o=[Link](),c=["expand","us
eCustomClose",r];n!==[Link]||o!==[Link]&&o!==[Link]?
a([Link],"[Link]",[Link].MRD011):
(e&&([Link]("url"),[Link](encodeURI(e))),[Link](null,c))},[Link]
=function(){var e=[Link](),n=["resize"],o=[Link]();o!==[Link]&&o!
==[Link]?
([Link]("width"),[Link]([Link]),[Link]("height"),[Link]([Link]),[Link]("offsetX"
),[Link](e
.offsetX),[Link]("offsetY"),[Link]([Link]),[Link]("customClosePosition"),[Link](
[Link]),[Link]("allowOffscreen"),[Link]([Link]),[Link](nu
ll,n)):a([Link],"[Link]",[Link].MRD012)},[Link]=function(e)
{return [Link]()[e]},[Link]=function(){return
[Link]()},[Link]=function(e)
{c(e,[Link](),"useCustomClose")&&c({useCustomClose:e},[Link]
[Link](),"expandProperties")&&([Link](e),[Link](
{useCustomClose:e}),i("useCustomClose","sdkCloseButton",!0===e?"invisible":!
1===e?"visible":void 0===e?"gone":""))},[Link]=function(){var
e=arguments&&arguments[0]?arguments[0]:"",n=arguments&&arguments[1]?
arguments[1]:"";[Link]()?[Link]>0?
i("playVideo","uri",e,"captionUrl",n):a([Link],"[Link]",[Link]
r.MRD009):a([Link],"[Link]",[Link].MRD010)},[Link]
vent=function(){},[Link]=function(e){[Link]()?e?
a([Link],"[Link]",[Link].MRD013):i("storePicture","uri",e)
:a([Link],"[Link]",[Link].MRD010)},[Link]=[Link]
ble,[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(e){e?
i("prepareStoreView","appStoreId",e):a([Link],"[Link]",[Link]
idError.MRD016)},[Link]=function(e){e?
i("presentStoreView","appStoreId",e):a([Link],"[Link]",[Link]
idError.MRD016)},[Link]=function(){return"v4.5.0"},[Link]=function()
{return [Link]()},[Link]=function(){return
[Link]()},[Link]=function(){return
[Link]()},[Link]=function(e)
{c(e,[Link](),"useCustomPrivacy")&&([Link](e),i("use
CustomPrivacy","useCustomPrivacy",e))},[Link]=[Link],r.
getConsentTitleText=[Link],[Link]=[Link]
,[Link]=[Link],[Link]
xt=[Link]}(window)}]);

You might also like