Skip to content

Commit f419518

Browse files
committed
Set correct values for enum types (fixes #1)
1 parent d66e93d commit f419518

File tree

2 files changed

+66
-61
lines changed

2 files changed

+66
-61
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.2 (unreleased)
2+
3+
Fixes:
4+
- Set correct values for enum types (fixes #1)
5+
16
## 2.0.1 (2020-11-20)
27

38
Fixes:

src/ima.d.ts

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -330,51 +330,51 @@ export namespace google {
330330
/**
331331
* No Ads VAST response after one or more wrappers. VAST error code 303
332332
*/
333-
VAST_NO_ADS_AFTER_WRAPPER,
333+
VAST_NO_ADS_AFTER_WRAPPER = 303,
334334
/**
335335
* Assets were found in the VAST ad response for nonlinear ad, but none of them matched the video player's capabilities. VAST error code 503
336336
*/
337-
VAST_NONLINEAR_ASSET_MISMATCH,
337+
VAST_NONLINEAR_ASSET_MISMATCH = 503,
338338
/**
339339
* Problem displaying MediaFile. Currently used if video playback is stopped due to poor playback quality. VAST error code 405
340340
*/
341-
VAST_PROBLEM_DISPLAYING_MEDIA_FILE,
341+
VAST_PROBLEM_DISPLAYING_MEDIA_FILE = 405,
342342
/**
343343
* VAST schema validation error. VAST error code 101
344344
*/
345-
VAST_SCHEMA_VALIDATION_ERROR,
345+
VAST_SCHEMA_VALIDATION_ERROR = 101,
346346
/**
347347
* The maximum number of VAST wrapper redirects has been reached. VAST error code 302
348348
*/
349-
VAST_TOO_MANY_REDIRECTS,
349+
VAST_TOO_MANY_REDIRECTS = 302,
350350
/**
351351
* Trafficking error. Video player received an ad type that it was not expecting and/or cannot display. VAST error code 200
352352
*/
353-
VAST_TRAFFICKING_ERROR,
353+
VAST_TRAFFICKING_ERROR = 200,
354354
/**
355355
* VAST duration is different from the actual media file duration. VAST error code 202
356356
*/
357-
VAST_UNEXPECTED_DURATION_ERROR,
357+
VAST_UNEXPECTED_DURATION_ERROR = 202,
358358
/**
359359
* Ad linearity is different from what the video player is expecting. VAST error code 201
360360
*/
361-
VAST_UNEXPECTED_LINEARITY,
361+
VAST_UNEXPECTED_LINEARITY = 201,
362362
/**
363363
* The ad response contained an unsupported VAST version. VAST error code 102
364364
*/
365-
VAST_UNSUPPORTED_VERSION,
365+
VAST_UNSUPPORTED_VERSION = 102,
366366
/**
367367
* General VAST wrapper error. VAST error code 300
368368
*/
369-
VAST_WRAPPER_ERROR,
369+
VAST_WRAPPER_ERROR = 300,
370370
/**
371371
* There was an error playing the video ad. VAST error code 400
372372
*/
373-
VIDEO_PLAY_ERROR,
373+
VIDEO_PLAY_ERROR = 400,
374374
/**
375375
* A VPAID error occurred. Refer to the inner error for more information. VAST error code 901
376376
*/
377-
VPAID_ERROR,
377+
VPAID_ERROR = 901,
378378
}
379379

380380
/**
@@ -384,11 +384,11 @@ export namespace google {
384384
/**
385385
* Indicates that the error was encountered when the ad was being loaded. Possible causes: there was no response from the ad server, malformed ad response was returned, or ad request parameters failed to pass validation.
386386
*/
387-
AD_LOAD = 'adLoadError',
387+
AD_LOAD = "adLoadError",
388388
/**
389389
* Indicates that the error was encountered after the ad loaded, during ad play. Possible causes: ad assets could not be loaded, etc.
390390
*/
391-
AD_PLAY = 'adPlayError',
391+
AD_PLAY = "adPlayError",
392392
}
393393
}
394394

@@ -415,7 +415,7 @@ export namespace google {
415415
/**
416416
* Fired when an error occurred while the ad was loading or playing.
417417
*/
418-
AD_ERROR = 'adError',
418+
AD_ERROR = "adError",
419419
}
420420

421421
type Listener = (event: AdErrorEvent) => void;
@@ -445,107 +445,107 @@ export namespace google {
445445
/**
446446
* Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.
447447
*/
448-
AD_BREAK_READY,
448+
AD_BREAK_READY = "adBreakReady",
449449
/**
450450
* Fired when the ad has stalled playback to buffer.
451451
*/
452-
AD_BUFFERING,
452+
AD_BUFFERING = "adBuffering",
453453
/**
454454
* Fired when an ads list is loaded.
455455
*/
456-
AD_METADATA,
456+
AD_METADATA = "adMetadata",
457457
/**
458458
* Fired when the ad's current time value changes. Calling getAdData() on this event will return an AdProgressData object.
459459
*/
460-
AD_PROGRESS,
460+
AD_PROGRESS = "adProgress",
461461
/**
462462
* Fired when the ads manager is done playing all the ads.
463463
*/
464-
ALL_ADS_COMPLETED,
464+
ALL_ADS_COMPLETED = "allAdsCompleted",
465465
/**
466466
* Fired when the ad is clicked.
467467
*/
468-
CLICK,
468+
CLICK = "click",
469469
/**
470470
* Fired when the ad completes playing.
471471
*/
472-
COMPLETE,
472+
COMPLETE = "complete",
473473
/**
474474
* Fired when content should be paused. This usually happens right before an ad is about to cover the content.
475475
*/
476-
CONTENT_PAUSE_REQUESTED,
476+
CONTENT_PAUSE_REQUESTED = "contentPauseRequested",
477477
/**
478478
* Fired when content should be resumed. This usually happens when an ad finishes or collapses.
479479
*/
480-
CONTENT_RESUME_REQUESTED,
480+
CONTENT_RESUME_REQUESTED = "contentResumeRequested",
481481
/**
482482
* Fired when the ad's duration changes.
483483
*/
484-
DURATION_CHANGE,
484+
DURATION_CHANGE = "durationChange",
485485
/**
486486
* Fired when the ad playhead crosses first quartile.
487487
*/
488-
FIRST_QUARTILE,
488+
FIRST_QUARTILE = "firstQuartile",
489489
/**
490490
* Fired when the impression URL has been pinged.
491491
*/
492-
IMPRESSION,
492+
IMPRESSION = "impression",
493493
/**
494494
* Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.
495495
*/
496-
INTERACTION,
496+
INTERACTION = "interaction",
497497
/**
498498
* Fired when the displayed ad changes from linear to nonlinear, or vice versa.
499499
*/
500-
LINEAR_CHANGED,
500+
LINEAR_CHANGED = "linearChanged",
501501
/**
502502
* Fired when ad data is available.
503503
*/
504-
LOADED,
504+
LOADED = "loaded",
505505
/**
506506
* Fired when a non-fatal error is encountered. The user need not take any action since the SDK will continue with the same or next ad playback depending on the error situation.
507507
*/
508-
LOG,
508+
LOG = "log",
509509
/**
510510
* Fired when the ad playhead crosses midpoint.
511511
*/
512-
MIDPOINT,
512+
MIDPOINT = "midpoint",
513513
/**
514514
* Fired when the ad is paused.
515515
*/
516-
PAUSED,
516+
PAUSED = "pause",
517517
/**
518518
* Fired when the ad is resumed.
519519
*/
520-
RESUMED,
520+
RESUMED = "resume",
521521
/**
522522
* Fired when the displayed ads skippable state is changed.
523523
*/
524-
SKIPPABLE_STATE_CHANGED,
524+
SKIPPABLE_STATE_CHANGED = "skippableStateChanged",
525525
/**
526526
* Fired when the ad is skipped by the user.
527527
*/
528-
SKIPPED,
528+
SKIPPED = "skip",
529529
/**
530530
* Fired when the ad starts playing.
531531
*/
532-
STARTED,
532+
STARTED = "start",
533533
/**
534534
* Fired when the ad playhead crosses third quartile.
535535
*/
536-
THIRD_QUARTILE,
536+
THIRD_QUARTILE = "thirdQuartile",
537537
/**
538538
* Fired when the ad is closed by the user.
539539
*/
540-
USER_CLOSE,
540+
USER_CLOSE = "userClose",
541541
/**
542542
* Fired when the ad volume has changed.
543543
*/
544-
VOLUME_CHANGED,
544+
VOLUME_CHANGED = "volumeChange",
545545
/**
546546
* Fired when the ad volume has been muted.
547547
*/
548-
VOLUME_MUTED,
548+
VOLUME_MUTED = "mute",
549549
}
550550

551551
type Listener = (event: AdEvent) => void;
@@ -858,7 +858,7 @@ export namespace google {
858858
/**
859859
* Fired when the ads have been loaded and an AdsManager is available.
860860
*/
861-
ADS_MANAGER_LOADED = 'adsManagerLoaded',
861+
ADS_MANAGER_LOADED = "adsManagerLoaded",
862862
}
863863

864864
type Listener = (event: AdsManagerLoadedEvent) => void;
@@ -1061,15 +1061,15 @@ export namespace google {
10611061
/**
10621062
* Specifies all creative types.
10631063
*/
1064-
ALL,
1064+
ALL = "All",
10651065
/**
10661066
* Specifies Flash creatives.
10671067
*/
1068-
FLASH,
1068+
FLASH = "Flash",
10691069
/**
10701070
* Specifies image creatives (such as JPEG, PNG, GIF, etc).
10711071
*/
1072-
IMAGE,
1072+
IMAGE = "Image",
10731073
}
10741074

10751075
/**
@@ -1079,19 +1079,19 @@ export namespace google {
10791079
/**
10801080
* Specifies that the resource can be any type of resource.
10811081
*/
1082-
ALL,
1082+
ALL = "All",
10831083
/**
10841084
* Specifies that the resource should be an HTML snippet.
10851085
*/
1086-
HTML,
1086+
HTML = "Html",
10871087
/**
10881088
* Specifies that the resource should be a URL that should be used as the source of an iframe.
10891089
*/
1090-
IFRAME,
1090+
IFRAME = "IFrame",
10911091
/**
10921092
* Specifies that the resource should be a static file (usually the URL of an image of SWF).
10931093
*/
1094-
STATIC,
1094+
STATIC = "Static",
10951095
}
10961096

10971097
/**
@@ -1101,15 +1101,15 @@ export namespace google {
11011101
/**
11021102
* Specifies that size should be ignored when choosing companions.
11031103
*/
1104-
IGNORE,
1104+
IGNORE = "IgnoreSize",
11051105
/**
11061106
* Specifies that only companions that match the size of the companion ad slot exactly should be chosen.
11071107
*/
1108-
SELECT_EXACT_MATCH,
1108+
SELECT_EXACT_MATCH = "SelectExactMatch",
11091109
/**
11101110
* Specifies that any companion close to the size of the companion ad slot should be chosen.
11111111
*/
1112-
SELECT_NEAR_MATCH,
1112+
SELECT_NEAR_MATCH = "SelectNearMatch",
11131113
}
11141114
}
11151115

@@ -1230,11 +1230,11 @@ export namespace google {
12301230
/**
12311231
* If the value is ALWAYS, companion backfill will be attempted in all situations, even when there is no master ad returned.
12321232
*/
1233-
ALWAYS,
1233+
ALWAYS = "always",
12341234
/**
12351235
* If the value is ON_MASTER_AD, companion backfill will be attempted if there is a master ad with fewer companions than there are companion slots. The missing companions will be backfilled.
12361236
*/
1237-
ON_MASTER_AD,
1237+
ON_MASTER_AD = "on_master_ad",
12381238
}
12391239

12401240
/**
@@ -1244,15 +1244,15 @@ export namespace google {
12441244
/**
12451245
* VPAID ads will not play and an error will be returned.
12461246
*/
1247-
DISABLED,
1247+
DISABLED = 0,
12481248
/**
12491249
* VPAID ads are enabled using a cross domain iframe. The VPAID ad cannot access the site. VPAID ads that depend on friendly iframe access may error. This is the default.
12501250
*/
1251-
ENABLED,
1251+
ENABLED = 1,
12521252
/**
12531253
* VPAID ads are enabled using a friendly iframe. This allows the ad access to the site via JavaScript.
12541254
*/
1255-
INSECURE,
1255+
INSECURE = 2,
12561256
}
12571257
}
12581258

@@ -1263,11 +1263,11 @@ export namespace google {
12631263
/**
12641264
* Displays the "Ad" text in the ad UI. Must be present to show the countdown timer.
12651265
*/
1266-
AD_ATTRIBUTION,
1266+
AD_ATTRIBUTION = "adAttribution",
12671267
/**
12681268
* Ad attribution is required for a countdown timer to be displayed. Both UiElements.COUNTDOWN and UiElements.AD_ATTRIBUTION must be present in AdsRenderingSettings.uiElements.
12691269
*/
1270-
COUNTDOWN,
1270+
COUNTDOWN = "countdown",
12711271
}
12721272

12731273
/**
@@ -1277,11 +1277,11 @@ export namespace google {
12771277
/**
12781278
* Fullscreen ad view mode. Indicates to the ads manager that the publisher considers the current AdDisplayContainer arrangement as fullscreen (i.e. simulated fullscreen). This does not cause the ads manager to enter fullscreen.
12791279
*/
1280-
FULLSCREEN,
1280+
FULLSCREEN = "fullscreen",
12811281
/**
12821282
* Normal ad view mode.
12831283
*/
1284-
NORMAL,
1284+
NORMAL = "normal",
12851285
}
12861286

12871287
/**

0 commit comments

Comments
 (0)