@flowplayer/player 3.28.0-rc → 3.28.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/events.d.ts +13 -0
- package/core/events.js +7 -1
- package/core.js +1 -1
- package/default.js +1 -1
- package/embed.js +2 -2
- package/flowplayer.css +1 -1
- package/index.d.ts +304 -8
- package/package.json +1 -1
- package/plugins/ads.d.ts +304 -17
- package/plugins/ads.js +1 -1
- package/plugins/airplay.d.ts +304 -17
- package/plugins/analytics.d.ts +304 -17
- package/plugins/analytics.js +1 -1
- package/plugins/asel.d.ts +304 -17
- package/plugins/audio.d.ts +304 -17
- package/plugins/chapters.d.ts +304 -17
- package/plugins/chromecast.d.ts +304 -17
- package/plugins/comscore.d.ts +304 -17
- package/plugins/consent.d.ts +304 -17
- package/plugins/context-menu.d.ts +304 -17
- package/plugins/cuepoints.d.ts +304 -17
- package/plugins/dash.d.ts +304 -17
- package/plugins/dash.js +3 -3
- package/plugins/drm.d.ts +304 -17
- package/plugins/endscreen.d.ts +304 -17
- package/plugins/fas.d.ts +304 -17
- package/plugins/float-on-scroll.d.ts +304 -17
- package/plugins/ga4.d.ts +304 -17
- package/plugins/gemius.d.ts +304 -17
- package/plugins/google-analytics.d.ts +304 -17
- package/plugins/hls.d.ts +304 -17
- package/plugins/hls.js +1 -1
- package/plugins/id3.d.ts +304 -17
- package/plugins/iframe.d.ts +304 -17
- package/plugins/keyboard.d.ts +304 -17
- package/plugins/media-session.d.ts +304 -17
- package/plugins/message.d.ts +304 -17
- package/plugins/ovp.d.ts +304 -17
- package/plugins/ovp.js +1 -1
- package/plugins/playlist.d.ts +304 -17
- package/plugins/preview.d.ts +304 -17
- package/plugins/qsel.d.ts +304 -17
- package/plugins/qul.d.ts +304 -17
- package/plugins/qul.js +1 -1
- package/plugins/rts.d.ts +304 -17
- package/plugins/rts.js +7 -7
- package/plugins/share.d.ts +304 -17
- package/plugins/speed.d.ts +304 -17
- package/plugins/ssai.d.ts +304 -17
- package/plugins/ssai.js +2 -2
- package/plugins/subtitles.d.ts +304 -17
- package/plugins/thumbnails.d.ts +304 -17
- package/plugins/tizen.d.ts +304 -17
- package/plugins/vtsel.d.ts +304 -17
- package/plugins/webos.d.ts +304 -17
- package/util/loader.d.ts +304 -17
package/plugins/ads.d.ts
CHANGED
|
@@ -908,17 +908,6 @@ ERROR = "error";
|
|
|
908
908
|
|
|
909
909
|
declare const ERRORED = "is-error";
|
|
910
910
|
|
|
911
|
-
/**
|
|
912
|
-
* @public
|
|
913
|
-
*/
|
|
914
|
-
declare type ErrorEventDetail = {
|
|
915
|
-
src?: string;
|
|
916
|
-
type?: string;
|
|
917
|
-
code?: number | string;
|
|
918
|
-
};
|
|
919
|
-
|
|
920
|
-
/* Excluded from this release type: _ErrorEventDetail */
|
|
921
|
-
|
|
922
911
|
declare class EventBus {
|
|
923
912
|
private _bus;
|
|
924
913
|
private _listeners;
|
|
@@ -987,7 +976,8 @@ declare namespace events {
|
|
|
987
976
|
RECOVER,
|
|
988
977
|
CUEPOINTS,
|
|
989
978
|
CUEPOINT_START,
|
|
990
|
-
CUEPOINT_END
|
|
979
|
+
CUEPOINT_END,
|
|
980
|
+
FLOWPLAYER_ERROR
|
|
991
981
|
}
|
|
992
982
|
}
|
|
993
983
|
|
|
@@ -1051,11 +1041,307 @@ declare namespace Flags_2 {
|
|
|
1051
1041
|
}
|
|
1052
1042
|
}
|
|
1053
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* @public
|
|
1046
|
+
* emitted to handle playback related errors
|
|
1047
|
+
*/
|
|
1048
|
+
declare const /**
|
|
1049
|
+
@public
|
|
1050
|
+
* when a new player is inserted into the HTML
|
|
1051
|
+
*/ /**
|
|
1052
|
+
* @public
|
|
1053
|
+
* emitted to handle playback related errors
|
|
1054
|
+
*/
|
|
1055
|
+
FLOWPLAYER_ERROR = "flowplayer:error";
|
|
1056
|
+
|
|
1054
1057
|
/**
|
|
1055
1058
|
* @public
|
|
1056
1059
|
*/
|
|
1057
1060
|
declare type FlowplayerCustomElementRegistry = Map<string, string>;
|
|
1058
1061
|
|
|
1062
|
+
declare class FlowplayerError extends Error {
|
|
1063
|
+
readonly message: string;
|
|
1064
|
+
readonly flowplayerErrorCode: FlowplayerErrorCode;
|
|
1065
|
+
readonly config: FlowplayerErrorConfig;
|
|
1066
|
+
static getErrorKey(code: FlowplayerErrorCode): FlowplayerErrorCodeName;
|
|
1067
|
+
readonly id: string;
|
|
1068
|
+
readonly fatal: boolean;
|
|
1069
|
+
readonly errorKey: string;
|
|
1070
|
+
constructor(message: string, flowplayerErrorCode: FlowplayerErrorCode, config?: FlowplayerErrorConfig);
|
|
1071
|
+
toJSON(): {
|
|
1072
|
+
message: string;
|
|
1073
|
+
flowplayer_error_code: FlowplayerErrorCode;
|
|
1074
|
+
id: string;
|
|
1075
|
+
root_error_id: string | undefined;
|
|
1076
|
+
resource: string | undefined;
|
|
1077
|
+
fatal: boolean;
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
declare type FlowplayerErrorCode = (typeof FlowplayerErrorCodeMap)[keyof typeof FlowplayerErrorCodeMap];
|
|
1082
|
+
|
|
1083
|
+
declare const FlowplayerErrorCodeMap: {
|
|
1084
|
+
/** Unknown */
|
|
1085
|
+
readonly Unknown: "00-00";
|
|
1086
|
+
/** Media Section */
|
|
1087
|
+
readonly MediaUnknown: "01-00";
|
|
1088
|
+
readonly MediaUnavailable: "01-01";
|
|
1089
|
+
readonly MediaUnsupportedVideoFormat: "01-02";
|
|
1090
|
+
readonly MediaUnsupportedAudioFormat: "01-03";
|
|
1091
|
+
readonly MediaBitrateExceeded: "01-04";
|
|
1092
|
+
readonly MediaBufferOverread: "01-05";
|
|
1093
|
+
readonly MediaIntegerOverflow: "01-06";
|
|
1094
|
+
readonly MediaQuotaExceeded: "01-07";
|
|
1095
|
+
readonly MediaInvalidCompositionDuration: "01-08";
|
|
1096
|
+
readonly MediaInvalidCompositionSourceDuration: "01-09";
|
|
1097
|
+
readonly MediaInvalidCompositionSourceStartTime: "01-10";
|
|
1098
|
+
readonly MediaMalformedDepth: "01-11";
|
|
1099
|
+
/** Playback Section */
|
|
1100
|
+
readonly PlaybackUnknown: "02-00";
|
|
1101
|
+
readonly PlaybackVideoBufferUnderRun: "02-01";
|
|
1102
|
+
readonly PlaybackAudioBufferUnderRun: "02-02";
|
|
1103
|
+
readonly PlaybackVideoBufferingTimeout: "02-03";
|
|
1104
|
+
readonly PlaybackAudioBufferingTimeout: "02-04";
|
|
1105
|
+
readonly PlaybackManifestParseError: "02-05";
|
|
1106
|
+
readonly PlaybackVideoDecodeError: "02-06";
|
|
1107
|
+
readonly PlaybackAudioDecodeError: "02-07";
|
|
1108
|
+
readonly PlaybackDroppedFramesExceeded: "02-08";
|
|
1109
|
+
readonly PlaybackPlayheadExceedsDuration: "02-09";
|
|
1110
|
+
readonly PlaybackUnsupportedDevice: "02-10";
|
|
1111
|
+
readonly PlaybackManifestLoadError: "02-11";
|
|
1112
|
+
readonly PlaybackManifestLoadTimeout: "02-12";
|
|
1113
|
+
readonly PlaybackManifestParsingError: "02-13";
|
|
1114
|
+
readonly PlaybackManifestIncompatibleCodecs: "02-14";
|
|
1115
|
+
readonly PlaybackLevelEmptyError: "02-15";
|
|
1116
|
+
readonly PlaybackLevelLoadError: "02-16";
|
|
1117
|
+
readonly PlaybackLevelLoadTimeout: "02-17";
|
|
1118
|
+
readonly PlaybackLevelSwitchError: "02-18";
|
|
1119
|
+
readonly PlaybackAudioTrackLoadError: "02-19";
|
|
1120
|
+
readonly PlaybackAudioTrackLoadTimeout: "02-20";
|
|
1121
|
+
readonly PlaybackFragLoadError: "02-21";
|
|
1122
|
+
readonly PlaybackFragLoadTimeout: "02-22";
|
|
1123
|
+
readonly PlaybackFragDecryptError: "02-23";
|
|
1124
|
+
readonly PlaybackFragParsingError: "02-24";
|
|
1125
|
+
readonly PlaybackFragGap: "02-25";
|
|
1126
|
+
readonly PlaybackRemuxAllocError: "02-26";
|
|
1127
|
+
readonly PlaybackBufferAddCodecError: "02-27";
|
|
1128
|
+
readonly PlaybackBufferIncompatibleCodecs: "02-28";
|
|
1129
|
+
readonly PlaybackBufferAppendError: "02-29";
|
|
1130
|
+
readonly PlaybackBufferStalledError: "02-30";
|
|
1131
|
+
readonly PlaybackBufferFullError: "02-31";
|
|
1132
|
+
readonly PlaybackBufferSeekOverHole: "02-32";
|
|
1133
|
+
readonly PlaybackBufferNudgeOnStall: "02-33";
|
|
1134
|
+
readonly PlaybackInternalException: "02-34";
|
|
1135
|
+
readonly PlaybackInternalAborted: "02-35";
|
|
1136
|
+
readonly PlaybackManifestLoaderFailure: "02-36";
|
|
1137
|
+
readonly PlaybackSegmentBaseLoaderError: "02-37";
|
|
1138
|
+
readonly PlaybackTimeSyncFailed: "02-38";
|
|
1139
|
+
readonly PlaybackFragmentLoaderFailure: "02-39";
|
|
1140
|
+
readonly PlaybackAppendError: "02-40";
|
|
1141
|
+
readonly PlaybackRemoveError: "02-41";
|
|
1142
|
+
readonly PlaybackDataUpdateFailed: "02-42";
|
|
1143
|
+
readonly PlaybackManifestNoStreams: "02-43";
|
|
1144
|
+
readonly PlaybackUnknownManifestType: "02-44";
|
|
1145
|
+
readonly PlaybackDashInsufficientSegmentInfo: "02-45";
|
|
1146
|
+
readonly PlaybackDashNoRepresentations: "02-46";
|
|
1147
|
+
readonly PlaybackDashNoAdaptationSets: "02-47";
|
|
1148
|
+
readonly PlaybackDashNoInitSegment: "02-48";
|
|
1149
|
+
readonly PlaybackDashUnsupportedContainerFormat: "02-49";
|
|
1150
|
+
readonly PlaybackDashKeySystemMismatch: "02-50";
|
|
1151
|
+
readonly PlaybackMultipleKeyIDs: "02-51";
|
|
1152
|
+
readonly PlaybackDashConflictingKeyIDs: "02-52";
|
|
1153
|
+
readonly PlaybackRestrictedStreams: "02-53";
|
|
1154
|
+
readonly PlaybackHlsMasterAndMediaTags: "02-54";
|
|
1155
|
+
readonly PlaybackRepresentationIdConflict: "02-55";
|
|
1156
|
+
readonly PlaybackHlsUnsupportedKeyFormats: "02-56";
|
|
1157
|
+
readonly PlaybackManifestNoVariants: "02-57";
|
|
1158
|
+
readonly PlaybackHlsUndeclaredVariables: "02-58";
|
|
1159
|
+
readonly PlaybackAes128InvalidKeyLength: "02-59";
|
|
1160
|
+
readonly PlaybackDashConflictingAes128Keys: "02-60";
|
|
1161
|
+
readonly PlaybackDashUnsupportedAes128Encryption: "02-61";
|
|
1162
|
+
readonly PlaybackManifestPatchMismatch: "02-62";
|
|
1163
|
+
readonly PlaybackEmptyMediaPlaylist: "02-63";
|
|
1164
|
+
readonly PlaybackNonContiguousCompositionTrack: "02-64";
|
|
1165
|
+
readonly PlaybackDecoderNotFound: "02-65";
|
|
1166
|
+
readonly PlaybackDecoderTemporarilyUnavailable: "02-66";
|
|
1167
|
+
readonly PlaybackIncompatibleAsset: "02-67";
|
|
1168
|
+
readonly PlaybackNoCompatibleExternalDisplay: "02-69";
|
|
1169
|
+
readonly PlaybackOutOfMemory: "02-70";
|
|
1170
|
+
readonly PlaybackToneMappingFailed: "02-71";
|
|
1171
|
+
readonly PlaybackVideoCompositorFailed: "02-72";
|
|
1172
|
+
/** Network Section */
|
|
1173
|
+
readonly NetworkUnknown: "03-00";
|
|
1174
|
+
readonly NetworkNoInternet: "03-01";
|
|
1175
|
+
readonly NetworkRequestTimeout: "03-02";
|
|
1176
|
+
readonly NetworkUnableToResolveHost: "03-03";
|
|
1177
|
+
readonly NetworkResourceNotFound: "03-04";
|
|
1178
|
+
readonly NetworkExpiredUrl: "03-05";
|
|
1179
|
+
readonly NetworkUrlResolutionFailed: "03-06";
|
|
1180
|
+
readonly NetworkDownloadErrorIdManifest: "03-07";
|
|
1181
|
+
readonly NetworkDownloadErrorIdSidx: "03-08";
|
|
1182
|
+
readonly NetworkDownloadErrorIdContent: "03-09";
|
|
1183
|
+
readonly NetworkDownloadErrorIdInitialization: "03-10";
|
|
1184
|
+
readonly NetworkDownloadErrorIdXlink: "03-11";
|
|
1185
|
+
readonly NetworkHttpRequestFailed: "03-12";
|
|
1186
|
+
readonly NetworkMaxRetriesExceeded: "03-13";
|
|
1187
|
+
readonly NetworkSegmentMissing: "03-14";
|
|
1188
|
+
/** HTTP Error Codes */
|
|
1189
|
+
readonly NetworkHttp400BadRequest: "03-400";
|
|
1190
|
+
readonly NetworkHttp401Unauthorized: "03-401";
|
|
1191
|
+
readonly NetworkHttp402PaymentRequired: "03-402";
|
|
1192
|
+
readonly NetworkHttp403Forbidden: "03-403";
|
|
1193
|
+
readonly NetworkHttp404NotFound: "03-404";
|
|
1194
|
+
readonly NetworkHttp405MethodNotAllowed: "03-405";
|
|
1195
|
+
readonly NetworkHttp406NotAcceptable: "03-406";
|
|
1196
|
+
readonly NetworkHttp407ProxyAuthenticationRequired: "03-407";
|
|
1197
|
+
readonly NetworkHttp408RequestTimeout: "03-408";
|
|
1198
|
+
readonly NetworkHttp409Conflict: "03-409";
|
|
1199
|
+
readonly NetworkHttp410Gone: "03-410";
|
|
1200
|
+
readonly NetworkHttp411LengthRequired: "03-411";
|
|
1201
|
+
readonly NetworkHttp412PreconditionFailed: "03-412";
|
|
1202
|
+
readonly NetworkHttp413PayloadTooLarge: "03-413";
|
|
1203
|
+
readonly NetworkHttp414URITooLong: "03-414";
|
|
1204
|
+
readonly NetworkHttp415UnsupportedMediaType: "03-415";
|
|
1205
|
+
readonly NetworkHttp416RangeNotSatisfiable: "03-416";
|
|
1206
|
+
readonly NetworkHttp417ExpectationFailed: "03-417";
|
|
1207
|
+
readonly NetworkHttp418ImATeapot: "03-418";
|
|
1208
|
+
readonly NetworkHttp421MisdirectedRequest: "03-421";
|
|
1209
|
+
readonly NetworkHttp422UnprocessableEntity: "03-422";
|
|
1210
|
+
readonly NetworkHttp423Locked: "03-423";
|
|
1211
|
+
readonly NetworkHttp424FailedDependency: "03-424";
|
|
1212
|
+
readonly NetworkHttp425TooEarly: "03-425";
|
|
1213
|
+
readonly NetworkHttp426UpgradeRequired: "03-426";
|
|
1214
|
+
readonly NetworkHttp428PreconditionRequired: "03-428";
|
|
1215
|
+
readonly NetworkHttp429TooManyRequests: "03-429";
|
|
1216
|
+
readonly NetworkHttp431RequestHeaderFieldsTooLarge: "03-431";
|
|
1217
|
+
readonly NetworkHttp451UnavailableForLegalReasons: "03-451";
|
|
1218
|
+
readonly NetworkHttp500InternalServerError: "03-500";
|
|
1219
|
+
readonly NetworkHttp501NotImplemented: "03-501";
|
|
1220
|
+
readonly NetworkHttp502BadGateway: "03-502";
|
|
1221
|
+
readonly NetworkHttp503ServiceUnavailable: "03-503";
|
|
1222
|
+
readonly NetworkHttp504GatewayTimeout: "03-504";
|
|
1223
|
+
readonly NetworkHttp505HTTPVersionNotSupported: "03-505";
|
|
1224
|
+
readonly NetworkHttp506VariantAlsoNegotiates: "03-506";
|
|
1225
|
+
readonly NetworkHttp507InsufficientStorage: "03-507";
|
|
1226
|
+
readonly NetworkHttp508LoopDetected: "03-508";
|
|
1227
|
+
readonly NetworkHttp510NotExtended: "03-510";
|
|
1228
|
+
readonly NetworkHttp511NetworkAuthenticationRequired: "03-511";
|
|
1229
|
+
/** Content Protection Section */
|
|
1230
|
+
readonly ContentProtectionUnknown: "04-00";
|
|
1231
|
+
readonly ContentProtectionConcurrentStreamLimitExceeded: "04-01";
|
|
1232
|
+
readonly ContentProtectionEntitlementRefused: "04-02";
|
|
1233
|
+
readonly ContentProtectionLicenseExpired: "04-03";
|
|
1234
|
+
readonly ContentProtectionBadLicenseRequest: "04-04";
|
|
1235
|
+
readonly ContentProtectionLicenseServerTimeout: "04-05";
|
|
1236
|
+
readonly ContentProtectionInsufficientHDCPSupport: "04-06";
|
|
1237
|
+
readonly ContentProtectionGeoRestricted: "04-07";
|
|
1238
|
+
readonly ContentProtectionParentalControlRestricted: "04-08";
|
|
1239
|
+
readonly ContentProtectionCDNUnauthorized: "04-09";
|
|
1240
|
+
readonly ContentProtectionInvalidAccessToken: "04-10";
|
|
1241
|
+
readonly ContentProtectionKeySystemNoKeys: "04-11";
|
|
1242
|
+
readonly ContentProtectionKeySystemNoAccess: "04-12";
|
|
1243
|
+
readonly ContentProtectionKeySystemNoSession: "04-13";
|
|
1244
|
+
readonly ContentProtectionKeySystemNoConfiguredLicense: "04-14";
|
|
1245
|
+
readonly ContentProtectionKeySystemCertificateRequestFailed: "04-15";
|
|
1246
|
+
readonly ContentProtectionKeySystemCertificateUpdateFailed: "04-16";
|
|
1247
|
+
/** Key System: Session update failed */
|
|
1248
|
+
readonly ContentProtectionKeySystemSessionUpdateFailed: "04-17";
|
|
1249
|
+
/** Key System: Status output restricted */
|
|
1250
|
+
readonly ContentProtectionKeySystemStatusOutputRestricted: "04-18";
|
|
1251
|
+
/** Key System: Status internal error */
|
|
1252
|
+
readonly ContentProtectionKeySystemStatusInternalError: "04-19";
|
|
1253
|
+
/** Key Load Error */
|
|
1254
|
+
readonly ContentProtectionKeyLoadError: "04-20";
|
|
1255
|
+
/** Key Load Timeout */
|
|
1256
|
+
readonly ContentProtectionKeyLoadTimeout: "04-21";
|
|
1257
|
+
/** Capability MediaKeys Error */
|
|
1258
|
+
readonly ContentProtectionCapabilityMediaKeysError: "04-22";
|
|
1259
|
+
/** Manifest indicated protected content, but unable to determine key systems */
|
|
1260
|
+
readonly ContentProtectionManifestKeySystemUnknown: "04-23";
|
|
1261
|
+
/**
|
|
1262
|
+
* None of the requested key system configurations are available.
|
|
1263
|
+
* Possible reasons:
|
|
1264
|
+
* - Key system not supported
|
|
1265
|
+
* - Requested features (e.g., persistent state) not supported
|
|
1266
|
+
* - User denied access in prompt
|
|
1267
|
+
* - Key system unavailable in insecure contexts (requires HTTPS)
|
|
1268
|
+
*/
|
|
1269
|
+
readonly ContentProtectionKeySystemUnavailable: "04-24";
|
|
1270
|
+
/** Browser found requested key system, but failed to create CDM instance */
|
|
1271
|
+
readonly ContentProtectionCDMCreationFailed: "04-25";
|
|
1272
|
+
/** Browser created CDM instance but failed to attach it to the video */
|
|
1273
|
+
readonly ContentProtectionCDMAttachFailed: "04-26";
|
|
1274
|
+
/** CDM rejected the server certificate (malformed or unsupported format) */
|
|
1275
|
+
readonly ContentProtectionCDMServerCertificateRejected: "04-27";
|
|
1276
|
+
/** CDM refused to create a session for unknown reasons */
|
|
1277
|
+
readonly ContentProtectionCDMSessionCreationFailed: "04-28";
|
|
1278
|
+
/** CDM unable to generate a license request due to malformed or unsupported init data */
|
|
1279
|
+
readonly ContentProtectionCDMLicenseRequestFailed: "04-29";
|
|
1280
|
+
/** License response rejected by the CDM (invalid/malformed response) */
|
|
1281
|
+
readonly ContentProtectionCDMLicenseResponseRejected: "04-30";
|
|
1282
|
+
/** Manifest does not specify DRM info, but content is encrypted */
|
|
1283
|
+
readonly ContentProtectionManifestMissingDRMInfo: "04-31";
|
|
1284
|
+
/** No license server was provided for the key system signaled by the manifest */
|
|
1285
|
+
readonly ContentProtectionLicenseServerMissing: "04-32";
|
|
1286
|
+
/** A required offline session was removed, affecting playback */
|
|
1287
|
+
readonly ContentProtectionOfflineSessionRemoved: "04-33";
|
|
1288
|
+
/** Error while executing init data transformation */
|
|
1289
|
+
readonly ContentProtectionInitDataTransformationError: "04-34";
|
|
1290
|
+
/** Server certificate request failed */
|
|
1291
|
+
readonly ContentProtectionServerCertificateRequestFailed: "04-35";
|
|
1292
|
+
/** HDCP version does not meet the requirements */
|
|
1293
|
+
readonly ContentProtectionInsufficientHDCPVersion: "04-36";
|
|
1294
|
+
/** Error when checking HDCP version */
|
|
1295
|
+
readonly ContentProtectionHDCPVersionCheckFailed: "04-37";
|
|
1296
|
+
/** Ads Section */
|
|
1297
|
+
readonly AdsUnknown: "08-00";
|
|
1298
|
+
readonly AdsVastParseError: "08-100";
|
|
1299
|
+
readonly AdsInvalidVastSchema: "08-101";
|
|
1300
|
+
readonly AdsVastVersionNotSupported: "08-102";
|
|
1301
|
+
readonly AdsUnexpectedAdType: "08-200";
|
|
1302
|
+
readonly AdsCreativeLinearityMismatch: "08-201";
|
|
1303
|
+
readonly AdsCreativeDurationMismatch: "08-202";
|
|
1304
|
+
readonly AdsCreativeSizeMismatch: "08-203";
|
|
1305
|
+
readonly AdsWrapperVastError: "08-300";
|
|
1306
|
+
readonly AdsVastResponseRedirectTimeout: "08-301";
|
|
1307
|
+
readonly AdsWrapperLimitReached: "08-302";
|
|
1308
|
+
readonly AdsVastResponseEmpty: "08-303";
|
|
1309
|
+
readonly AdsLinearAdDisplayError: "08-400";
|
|
1310
|
+
readonly AdsMediaFileNotFound: "08-401";
|
|
1311
|
+
readonly AdsMediaFileUnavailable: "08-402";
|
|
1312
|
+
readonly AdsUnsupportedMimeType: "08-403";
|
|
1313
|
+
readonly AdsUnableToDisplayMediaFile: "08-405";
|
|
1314
|
+
readonly AdsMezzanineFileMissing: "08-406";
|
|
1315
|
+
readonly AdsMezzanineFileDownloaded: "08-407";
|
|
1316
|
+
readonly AdsRejectedAd: "08-408";
|
|
1317
|
+
readonly AdsInteractiveCreativeError: "08-409";
|
|
1318
|
+
readonly AdsVerificationNodeExecutionError: "08-410";
|
|
1319
|
+
readonly AdsNonLinearAdDisplayError: "08-500";
|
|
1320
|
+
readonly AdsNonLinearAdSizeMismatch: "08-501";
|
|
1321
|
+
readonly AdsNonLinearAdFetchError: "08-502";
|
|
1322
|
+
readonly AdsNonLinearUnsupportedType: "08-503";
|
|
1323
|
+
readonly AdsCompanionAdDisplayError: "08-600";
|
|
1324
|
+
readonly AdsCompanionAdSizeMismatch: "08-601";
|
|
1325
|
+
readonly AdsRequiredCompanionAdError: "08-602";
|
|
1326
|
+
readonly AdsCompanionAdFetchError: "08-603";
|
|
1327
|
+
readonly AdsUndefinedVastError: "08-900";
|
|
1328
|
+
readonly AdsUnknownVpaidError: "08-901";
|
|
1329
|
+
readonly AdsVastDocumentEmpty: "08-999";
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
declare type FlowplayerErrorCodeName = keyof typeof FlowplayerErrorCodeMap;
|
|
1333
|
+
|
|
1334
|
+
declare type FlowplayerErrorConfig = Partial<{
|
|
1335
|
+
fatal: boolean;
|
|
1336
|
+
resource: string;
|
|
1337
|
+
rootErrorId: string;
|
|
1338
|
+
preventRetry: boolean;
|
|
1339
|
+
}>;
|
|
1340
|
+
|
|
1341
|
+
declare type FlowplayerErrorEventDetail = {
|
|
1342
|
+
error: FlowplayerError;
|
|
1343
|
+
};
|
|
1344
|
+
|
|
1059
1345
|
/**
|
|
1060
1346
|
* @public
|
|
1061
1347
|
*/
|
|
@@ -3121,6 +3407,7 @@ declare type PlayerCustomEventsDetailMap = PlayerEmittableCustomEventsDetailMap
|
|
|
3121
3407
|
[RECOVER]: RecoverEventDetail;
|
|
3122
3408
|
[QUALITIES]: QualitiesEventDetail;
|
|
3123
3409
|
[QUALITY_CHANGE]: QualityChangeEventDetail;
|
|
3410
|
+
[FLOWPLAYER_ERROR]: FlowplayerErrorEventDetail;
|
|
3124
3411
|
/* Excluded from this release type: audioonlysource */
|
|
3125
3412
|
/* Excluded from this release type: renderplugin */
|
|
3126
3413
|
/* Excluded from this release type: "seek:queued" */
|
|
@@ -3142,7 +3429,6 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
3142
3429
|
/**
|
|
3143
3430
|
* Sent when an error occurs. Learn more about error handling.
|
|
3144
3431
|
*/
|
|
3145
|
-
on(event: typeof ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof ERROR]>) => void): Player;
|
|
3146
3432
|
on(// FIXME - this event is in context-menu plugin
|
|
3147
3433
|
event: typeof CONTEXT_MENU, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof CONTEXT_MENU]>) => void): Player;
|
|
3148
3434
|
/* Excluded from this release type: on */
|
|
@@ -3181,6 +3467,10 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
3181
3467
|
* Emitted when the media changes quality.
|
|
3182
3468
|
*/
|
|
3183
3469
|
on(event: typeof QUALITY_CHANGE, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof QUALITY_CHANGE]>) => void): Player;
|
|
3470
|
+
/**
|
|
3471
|
+
* Emitted when a standard FlowplayerError is encountered
|
|
3472
|
+
*/
|
|
3473
|
+
on(event: typeof FLOWPLAYER_ERROR, handler: (e: FPEvent<PlayerCustomEventsDetailMap[typeof FLOWPLAYER_ERROR]>) => void): Player;
|
|
3184
3474
|
/* Excluded from this release type: on */
|
|
3185
3475
|
/**
|
|
3186
3476
|
* Listen to this event to create a recommendations grid using the data passed with the event.
|
|
@@ -3233,12 +3523,9 @@ declare type PlayerCustomEventsOverloads = {
|
|
|
3233
3523
|
emit(event: never, data?: never): Player;
|
|
3234
3524
|
/* Excluded from this release type: emit */
|
|
3235
3525
|
/* Excluded from this release type: emit */
|
|
3236
|
-
/* Excluded from this release type: emit */
|
|
3237
|
-
/* Excluded from this release type: emit */
|
|
3238
3526
|
};
|
|
3239
3527
|
|
|
3240
3528
|
declare type PlayerEmittableCustomEventsDetailMap = {
|
|
3241
|
-
[ERROR]: ErrorEventDetail;
|
|
3242
3529
|
[CONTEXT_MENU]: ContextMenuEventDetail;
|
|
3243
3530
|
[VIEW_ENTER]: ViewEnterEventDetail;
|
|
3244
3531
|
[VIEW_LEAVE]: ViewLeaveEventDetail;
|
|
@@ -3291,7 +3578,7 @@ export declare type PlayerIMAConfig = {
|
|
|
3291
3578
|
|
|
3292
3579
|
declare type PlayerNativeEventName = keyof PlayerNativeEventsDetailMap;
|
|
3293
3580
|
|
|
3294
|
-
declare type PlayerNativeEventsDetailMap =
|
|
3581
|
+
declare type PlayerNativeEventsDetailMap = HTMLVideoElementEventMap;
|
|
3295
3582
|
|
|
3296
3583
|
declare type PlayerNativeEventsOverloads = {
|
|
3297
3584
|
on<K extends keyof PlayerNativeEventsDetailMap>(event: K, handler: (ev: PlayerNativeEventsDetailMap[K]) => void): Player;
|
package/plugins/ads.js
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* https://github.com/lancedikson/bowser
|
|
5
5
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
6
6
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
7
|
-
*/const yt=class Bowser{static getParser(t,e=!1){if("string"!=typeof t)throw new Error("UserAgent should be a string");return new Parser(t,e)}static parse(t){return new Parser(t).getResult()}static get BROWSER_MAP(){return ct}static get ENGINE_MAP(){return pt}static get OS_MAP(){return ht}static get PLATFORMS_MAP(){return ut}}.parse(window.navigator.userAgent),{platform:At,os:bt,browser:wt}=yt,Et=t=>t&&t.toLowerCase();var St={rnd:Math.random().toString(36).substr(2,32),os:Et(bt.name+(bt.versionName?" "+bt.versionName:"")),device:Et(At.type),browser:Et(wt.name),browser_version:(wt&&wt.version?wt.version:"unknown").split(".").shift(),plugin_version:"3.28.0-rc"};const Tt="https://fp-eu-w1-aai.flowplayer.com/in",Lt="POST",Ot=["ad-requested","ad-request-error","ad-request-completed","ad-completed","ad-started","ad-error","ad-skipped"],Rt=["event_type","ad_tag_id","media_id","player_id","site_id","sitegroup_id","rnd","os","device","browser","browser_version","plugin_version","player_version"],Mt=["vast_error","reason","request_load_time","ad_type","vast_ad_id"],kt=S("ads/analytics"),Pt=RequestQueue.of(),Dt=(...t)=>Object.assign({},...t);class Analytics{static of(t,e){return new Analytics(t,e)}static ensure_required_keys(t,e){return t.required_keys.filter(t=>!(t in e))}static pluck_valid_keys(t,e){return((t,...e)=>Object.keys(t).filter(t=>~e.indexOf(t)).reduce((e,s)=>Object.assign(e,{[s]:t[s]}),{}))(e,...t.valid_keys)}static mergeMetadata(t,e={}){return t.metadata=Analytics.pluck_valid_keys(t,Dt(t.metadata,e,{player_version:"3.28.0-rc"})),t}constructor(t,e={}){this.emitter=t,this.metadata=Dt(St,e.metadata||{}),this.emitter=t,this.events=e.events||[],this.required_keys=e.required_keys||[],this.optional_keys=e.optional_keys||[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),kt(this),this.wireup()}wireup(){this.events.forEach(t=>{this.emitter.on(t,e=>{const s=e.detail,i=Dt(this.metadata,{event_type:t},s),r=Analytics.pluck_valid_keys(this,i),a=Analytics.ensure_required_keys(this,r);if(kt(`Event[${t}]`,{payload:r,observation:s}),a.length)return kt(`Analytics.validate_metadata() failed for\n Event[${t}]\n missing keys: ${a}`,r);RequestQueue.rpush(Pt,[Tt,Lt,r])})})}destroy(){this.emitter=this.metadata=this.events=this.required_keys=this.optional_keys=this.valid_keys=void 0}}const It=S("ads/controller"),Ct={show_all_ads_on_seek:!1,timeout:5e3,preload_advance:10};class AdsController extends class EventBus{constructor(t=document.createElement("div"),e=[]){this._bus=t,this._listeners=e}removeAllListeners(){this._listeners.length=0,this._bus=document.createElement("div")}emit(t,e){const s=new CustomEvent(t,{detail:e||{}});this._bus.dispatchEvent(s)}on(t,e){this._listeners.push([t,e]),this._bus.addEventListener(t,e,{passive:!0})}once(t,e){this._bus.addEventListener(t,e,{once:!0})}removeListener(t,e){this._bus.removeEventListener(t,e)}}{constructor(t={}){var e;super(),this.adapter=function(t,e){return t.adapter?new t.adapter(e):new IMA(e)}(t,this),this.opts=Object.assign(Object.assign({},Ct),t),this.analytics=(e=this,Analytics.of(e,{required_keys:Rt,optional_keys:Mt,events:Ot})),this._state=AdsState.of(),this._schedule=void 0,this._lastAd=void 0,this._macros=new Macros(t.parameters||{}),this.wireup(),this.content_processing_src=!1}reset(){return this.removeAllListeners(),this.wireup(),this.analytics&&this.analytics.wireup(),this._state.reset(),this.adapter.reset(),this}destroy(){this.removeAllListeners(),this.analytics&&this.analytics.destroy(),this.adapter&&this.adapter.destroy();this.analytics=void 0,this.opts=void 0,this.adapter=void 0,this._state=void 0,this._schedule=void 0,this._lastAd=void 0,this._macros=void 0}stop(){this.adapter&&this.adapter.stop()}onContentNewSrc(){this._state.reset(),this.adapter.destroyManager(),this.adapter.contentComplete()}wireup(){const t=()=>{var t,e;this.adapter.onAdRequestEnd(),null===(t=this.videoTag)||void 0===t||t.setState("ad-paused",!1),null===(e=this.videoTag)||void 0===e||e.setState("ad-playing",!0),this._state.toggleState(ot.PLAYING,!0)};this.on("ad-play-requested",t),this.on("ad-started",t),this.on("ad-resumed",t);const e=t=>{var e,s;"ad-request-error"!==(null==t?void 0:t.type)&&this.adapter.onAdRequestEnd(),null===(e=this.videoTag)||void 0===e||e.setState("ad-paused","ad-paused"===(null==t?void 0:t.type)),null===(s=this.videoTag)||void 0===s||s.setState("ad-playing",!1),this.adPlaying&&this._state.toggleState(ot.PLAYING,!1)};this.on("ad-break-completed",e),this.on("ad-teardown",e),this.on("ad-playback-error",e),this.on("ad-request-error",e),this.on("ad-paused",e),this.on("ad-skipped",e),this.on("ad-completed",e),this.on("ad-break-completed",()=>{requestAnimationFrame(()=>{this._state.toggleState(ot.BREAK_ACTIVE,!1)})}),this.on("ad-adapter-init-failed",()=>{console.error("Adapter init failed"),e(),this._state.toggleState(ot.FATAL_ERROR,!0)}),this.on("reload-ad-requested",async t=>{if(It("Ads.on(RELOAD_AD_REQUESTED)",t),this._schedule){if(e(),t)return this._schedule.reset(this._schedule.getAds());this._state.hasAny(ot.AD_AVAILABLE)&&(this._schedule.decrement(),this._state.toggleState(ot.AD_AVAILABLE,!1))}})}async initialize(t,e={},s){return It("Ads.initialize():",t,e,s),this._state.toggleState(ot.INITIALIZING,!0),Object.assign(this.opts,e),Array.isArray(t)&&this.setSchedule(t),await this.adapter.init(this.opts),this._macros=this._macros.fork(Object.assign({},e.parameters||{},{autoplay:e.autoplay,muted:e.muted})),this.adapter.isReady()&&await this.adapterInitialized(s),this}get videoTag(){return this.adapter.getVideoTag()}get adInfo(){return this.adapter.getAdInfo()}async setVideoTag(t){It("Ads.setVideoTag():",t),await this.adapter.setVideoTag(t),this.trigger("ad-videotag-attached",t),this.adapter.isReady()&&await this.adapterInitialized(),t.on("request/ad/pause",()=>this.adapter.pause()),t.on("request/ad/play",()=>this.adapter.resume()),t.on("request/ad/muteunmute",()=>t.toggleMute()),t.on("volumechange",()=>{this.adapter.volume(t.muted?0:0==t.volume?.1:t.volume)}),t.on("src",()=>t.hasState("ad-playing")||t.hasState("ad-paused")?(this.stop(),this.adapter.isLinearAd()?(this.setIsContentProcessingNewSrc(!0),void this.once("ad-break-completed",()=>{setTimeout(()=>{this.setIsContentProcessingNewSrc(!1),this.onContentNewSrc()},0)})):this.onContentNewSrc()):this.onContentNewSrc())}waitForVideoTag(){return new Promise(t=>{const e=this.adapter.getVideoTag();if(e)return t(e);this.on("ad-videotag-attached",e=>{this.once(g,()=>t(e))})})}async adapterInitialized(t){It("Ads.adapterInitialized()"),this._state.toggleState(ot.INITIALIZING,!1),this._state.toggleState(ot.BREAK_ACTIVE,!!this.hasPreroll()),await this.setCurrentTime(0,t),this.checkIfBreakComplete(),this.adapter.isAdPod()||t&&!this.opts.autoplay||this.trigger("ad-teardown")}async fetchNextAd(t,e=0){var s,i;if(!this._schedule)return;if(!this.adapter.isReady())return;if(e>50)throw this._state.toggleState(ot.FATAL_ERROR,!0),this._state.toggleState(ot.FETCHING_AD,!1),new Error("Ads.fetchNextAd() :max_recursion_depth");const r=(null===(s=this._schedule)||void 0===s?void 0:s.getNextAd())||(null===(i=this._schedule)||void 0===i?void 0:i.getPostroll());if(!r||this.adapter.canDismissNonLinear()||-1===t)if(this._schedule.waitForLoad(t,r,this.opts.preload_ads))this._state.toggleState(ot.FETCHING_AD,!1);else if(r!==this._schedule.getPostroll()||(this._schedule.setPostrollActive(),-1===t))if(this._schedule.isDrained()||this._schedule.increment(),r){It("Ads.fetchNextAd",r),this._state.toggleState(ot.FETCHING_AD,!0);try{return await this.requestAd(r),this._state.toggleState(ot.AD_AVAILABLE,!0),void this._state.toggleState(ot.FETCHING_AD,!1)}catch(s){return It("Ads.fetchNextAd(err: %o, ad: %o)",s,r),this.setLastAd(r),r!==this._schedule.getPostroll()?await this.fetchNextAd(t,++e):void this._state.toggleState(ot.FETCHING_AD,!1)}}else this._state.toggleState(ot.FETCHING_AD,!1);else this._state.toggleState(ot.FETCHING_AD,!1)}skipAdsOnSeek(t){if(!this._schedule)return;let e=this._schedule.getNextAd();for(;e&&e.time<t;)this._schedule.increment(),e=this._schedule.getNextAd()}async setCurrentTime(t,e=!1,s=!1){if(!this._schedule)return;if(!this.adapter.isReady())return;if(this._state.hasAny(ot.FETCHING_AD))return;if(this._state.hasAny(ot.PLAYING)&&this.adapter.isLinearAd())return;const i=0===t&&0===this._schedule.getNextIndex();try{if(s&&!this.opts.show_all_ads_on_seek&&this.skipAdsOnSeek(t),this._state.hasAny(ot.AD_AVAILABLE)||await this.fetchNextAd(t),!this._state.hasAny(ot.AD_AVAILABLE)||!this.shallPlayAd(t)||e)return;await this.playAd(),await this.setCurrentTime(t),this.checkIfBreakComplete()}catch(t){It("setCurrentTime: Error(from: setCurrentTime, message: %s)",t.message)}finally{i&&this.trigger("ad-preroll-finished")}}async playAd(){var t;if(!this._state.hasAny(ot.AD_AVAILABLE))return;this._state.toggleState(ot.AD_AVAILABLE,!1),this._state.toggleState(ot.BREAK_ACTIVE,!0);const e=null===(t=this._schedule)||void 0===t?void 0:t.getCurrentAd();try{await this.adapter.playAd()}catch(t){console.error("Ads.playAd: error",t)}finally{e&&this.setLastAd(e)}}checkIfBreakComplete(){if(!this._state.hasAny(ot.BREAK_ACTIVE))return It("Ads.checkIfBreakComplete(:bail, ad: %o)",this.getLastAd());It("Ads.checkIfBreakComplete(:run, ad: %o)",this.getLastAd()),this._state.toggleState(ot.BREAK_ACTIVE,!1),this.adapter.isAdPod()||this.trigger("ad-break-completed")}resetScheduleCounter(){this._schedule&&this._schedule.resetCounter()}setSchedule(t,e){if(e&&!isNaN(e)&&this._schedule&&this._schedule.updateContentDuration(e),this._schedule&&this._schedule.getNextIndex()>0)return this._schedule.setAds(t);this._schedule=new Schedule(t,{preload_advance:this.opts.preload_advance,content_duration:e?0:e})}toJSON(){return this._schedule?this._schedule.toJSON():[]}trigger(t,e={}){var s;if(!this.adapter.getVideoTag())return;if(!this._state)return;if("ad-break-completed"===t&&this._state.hasAny(ot.BREAK_ACTIVE)&&!this.adapter.isAdPod())return It("skipping AD_BREAK_COMPLETE reason: %s pod=%s",this._state.toString(),this.adapter.isAdPod());if(null===(i=e)||"object"!=typeof i||at(i)!==rt)return this.dispatch(t,e);var i;const r=Object.assign({},this.adapter.getOpts()||{},(null===(s=this._schedule)||void 0===s?void 0:s.getCurrentAd())||{},{ad_type:this.ad_type},e);return this.dispatch(t,r)}dispatch(t,e){const s=this.adapter.getVideoTag();if(s){It(":dispatch",t,e),this.adapter.isAdPod()&&"object"==typeof e&&"time"in e&&"preroll"!==e.ad_type&&(e.time=this.adapter.getAdBreakTime());try{const i={event:"ads/"+t,detail:{outstream:e.outstream,ad_type:e.ad_type,ad_break_time:e.time,ad_remaining_seconds:e.remaining,ad_muted:e.muted,ad_duration_seconds:e.duration,ad_error_reason:e.reason,ad_vast_error:e.vast_error,ad_vast_error_type:e.vast_error_type,ad_request_load_type:e.request_load_time}};s.dispatchEvent(new CustomEvent("health:record",{detail:i}))}catch(t){It(":error",t)}f(s,t,e),this.emit(t,e)}}get ad_type(){if(!this.videoTag)return;if(!this.adapter.isAdPod())return this._schedule&&this._schedule.getCurrentType();const t=this.adapter.getAdBreakTime();return-1===t?"postroll":this.videoTag.hasState("is-live")||t<1?"preroll":"midroll"}shouldRestartContent(){if(this.getIsContentProcessingNewSrc())return!1;if(this.adapter.isAdPod())return!0;const t=this.getLastAd();return!t||!t.outstream&&!1!==t.restart}async finished(t){if(this._schedule&&(It("Ads.finished"),!(this.adapter.isCustomPlaybackEnabled()&&this._state.hasAny(ot.PLAYING)&&this.adapter.isLinearAd()))){It("Ads.finished: trying to play postroll");try{if(!this._schedule.getPostroll())return It("Ads.finished: no postroll found"),await this.adapter.contentComplete();this._state.hasAny(ot.AD_AVAILABLE)||await this.fetchNextAd(-1),await this.playAd(),this.adapter.contentComplete()}catch(t){It("Ads.finished: postroll failed:",t)}finally{this.trigger("ad-postroll-finished"),this.checkIfBreakComplete(),"function"==typeof t&&t()}}}hasPreroll(){return this._schedule&&Schedule.hasPreroll(this._schedule.getAds())}shallPlayAd(t){var e;return(!this.adapter||!this.adapter.isAdPod())&&(!(!this._state||this._state.hasAny(ot.FATAL_ERROR))&&!!(null===(e=this._schedule)||void 0===e?void 0:e.shallPlayAd(t)))}setLastAd(t){return this._lastAd=t,this}setIsContentProcessingNewSrc(t){this.content_processing_src=t}getLastAd(){return this._lastAd}getIsContentProcessingNewSrc(){return this.content_processing_src}mergeMacros(t={}){return this._macros=this._macros.fork(Object.assign({},t)),this}get paused(){return this.adapter&&this.adapter.isPaused()}pause(){this.adapter&&this.adapter.pause()}resume(){this.adapter&&this.adapter.resume()}resize(t){this.adapter&&this.adapter.onResize(t)}async requestAd(t,e=0,s=this.opts.timeout){if(!this._state)return;It("Ads.requestAd(ad: %o)",{ad:t,timeout:s,idx:e});const i=await async function t(e){if("function"==typeof e)return[await it(e)];if("string"==typeof e)return[await it(e)];if(Array.isArray(e)){const t=e;return await Promise.all(t.map(it))}if("object"==typeof e&&e&&e.adTag)return await t(e.adTag);throw new Error(`\n unhandled ads type ${typeof e}:\n ${JSON.stringify(e)}\n can be:\n | Array<string>\n | string\n | function\n | {adTag: Array<string>|string|function}\n `)}(t);if(void 0===i[e])return setTimeout(()=>this.trigger("ad-teardown"),0),Promise.reject(new Error("Ad failed, no fallbacks left"));if(!i[e])return await this.requestAd(i,e+1,s);this.trigger("ad-requested",t);const r=this._macros.compile(i[e],et(this.opts,this.adapter.getDimensions()));try{return void await this.adapter.initAd(r,s)}catch(t){return It(`Ads.requestAd(:fallback, idx: ${e}, length: ${i.length}, adTag: ${i[e]})\nError `,{adTag:i,err:t}),this.requestAd(i,e+1,s)}}resetSchedule(t){this._schedule&&this._schedule.reset(t)}get adPlaying(){return this._state&&this._state.hasAny(ot.PLAYING)}get adBreak(){return this._state&&this._state.hasAny(ot.BREAK_ACTIVE)}get adRequesting(){return this._state.hasAny(ot.FETCHING_AD)}get adLinear(){return this.adBreak&&this.adapter.isLinearAd()}}var Nt=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),Ut=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function xt(t){return Object.assign({muted:!1,timeout:250,inline:!1},t)}function Ft(t,e){var s=t.muted,i=t.timeout,r=t.inline,a=e(),n=a.element,o=a.source,d=void 0,l=void 0,c=void 0;return n.muted=s,!0===s&&n.setAttribute("muted","muted"),!0===r&&n.setAttribute("playsinline","playsinline"),n.src=o,new Promise((function(t){d=n.play(),l=setTimeout((function(){c(!1,new Error("Timeout "+i+" ms has been reached"))}),i),c=function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n.remove(),n.srcObject=null,clearTimeout(l),t({result:e,error:s})},void 0!==d?d.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var qt={audio:function(t){return Ft(t=xt(t),(function(){return{element:document.createElement("audio"),source:URL.createObjectURL(Nt)}}))},video:function(t){return Ft(t=xt(t),(function(){return{element:document.createElement("video"),source:URL.createObjectURL(Ut)}}))}};let Bt=void 0;async function jt(t=!0){return Bt||(Bt=await qt.video({timeout:500,muted:t}),Bt)}const Ht=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});var Vt=Object.freeze({__proto__:null,STICKY_CONTROLS:1,NO_FULLSCREEN:2,NO_AD_INDICATOR:4,AD_ATTRIBUTION:8,AD_CHOICES:16,REMAINING_TIME:32,VOLUME_BAR:64});const zt=["progress","duration","remaining"];class AdUI extends HTMLElement{static get observedAttributes(){return zt}constructor(t){super(),this.player=t,this.className="fp-ad-ui",this.append(...t.createComponents("flowplayer-ad-controls","flowplayer-ad-countdown")),t.on("ad/set-ui-flags",t=>{let{ui_flags:e}=t.detail;if(e=e||0,(8&e)>0){const t=document.createElement("div");t.classList.add("ad-attribution"),t.textContent=this.player.i18n("ads.advertisement","Advertisement"),this.append(t)}})}}const Gt=S("fpads:native:outstream"),Wt={OUTSTREAM:"is-outstream",HIDDEN:"is-outstream-hidden",SHOWING:"is-outstream-visible",DONE:"is-outstream-done"};var Qt,$t;!function(t){t.OUTSTREAM_VISIBLE="ads-outstream-visible",t.OUTSTREAM_VIEWPORT_UPDATE="ads-outstream-viewport-update",t.OUTSTREAM_TEARDOWN="ads-outstream-teardown",t.OUTSTREAM_ENDSCREEN_READY="ads-outstream-endscreen-ready"}(Qt||(Qt={})),function(t){t[t.None=0]="None",t[t.Booting=1]="Booting",t[t.Ready=2]="Ready",t[t.Disposed=3]="Disposed"}($t||($t={}));class Outstream{constructor({ads:t,root:e,content:s,ima:i}){this.state=$t.None,Gt("creating Outstream instance"),this.content=s,this.ads=t,this.root=e,this.ima=i,this.aspectRatio=s.videoHeight/s.videoWidth,this.dimensions=function(t){if(t.clientWidth>0||t.clientHeight)return h(t);const e={height:t.style.height};p(t,"opacity",0),p(t,"display","absolute"),p(t,"display","inline-block"),p(t,"height","auto");const s=h(t);return p(t,"height",e.height),p(t,"opacity",1),s}(this.root),this.adUi=new AdUI(s),this.initialVolumeState={},e.classList.add(Wt.OUTSTREAM),e.append(this.adUi),this.hide(),this.ads.on("ad-pause-content",t=>{var e;if(this.state==$t.Disposed)return;const s=!!(null===(e=t.detail)||void 0===e?void 0:e.linear);this.ads.resize(Object.assign(Object.assign({},this.dimensions),{linear:s}))}),s.on("resize",t=>{if(this.state==$t.Disposed)return;const e=t.detail;e&&(this.dimensions={width:e.contentRect.width,height:e.contentRect.height},this.ads.resize(this.dimensions))});let r=1,a=!0;s.on("intersectionchange",t=>{if(this.state==$t.Disposed)return;const e=t.detail;if(e)switch(this.state){case $t.Booting:return Gt(":boot skipping intersectionchange");case $t.None:return this.state=$t.Booting,this.begin_life_cycle();case $t.Ready:if(r=e.ratio,e.ratio>=.5&&this.ads.adPlaying)return;e.ratio>=.5&&a&&this.ads.resume(),e.ratio<.5&&this.ads.pause()}}),this.content.on("ad-paused",()=>a=r<.5),this.setup(),setTimeout(()=>(this.state=$t.Booting,this.begin_life_cycle()),0)}hide(){return this}restore_aspect_ratio(){return Gt(`Outstream.restore_aspect_ratio(${this.aspectRatio})`),this.content.setOpts({ratio:this.aspectRatio}),this}show(){this.root.classList.remove(Outstream.CLASS.HIDDEN),this.root.classList.add(Outstream.CLASS.SHOWING),this.content.setState("ad-linear",!0)}async begin_life_cycle(){var t;this.state=$t.Ready;const{error:e,result:s}=await jt(!1),{result:i}=await jt(!0);this.content.emit("ad/set-ui-flags",{ui_flags:null===(t=this.content.opts.ads)||void 0===t?void 0:t.ui}),this.attach_ad_listeners(),this.initialVolumeState={can_autoplay:!(!s&&!i),muted:!s},Gt("Outstream.show() :autoplay >> sound="+s),e&&this.content&&!s&&(this.content.muted=!0,this.content.volume=0),await this.ads.setVideoTag(this.content),await P({ads:this.ads,content:this.content,adContainer:this.adUi,ima:this.ima,state:{listening:!1},config:this.content.opts}),U({content:this.content,ads:this.ads}),this.state=$t.Ready}attach_ad_listeners(){this.ads.once("ad-pause-content",()=>{this.show(),this.ads.adPlaying&&this.ads.pause()});const t=()=>{M.forEach(e=>this.ads.removeListener(e,t));const e=new CustomEvent(Qt.OUTSTREAM_TEARDOWN);Gt("Outstream(:teardown)",e),this.content.dispatchEvent(e)};M.forEach(e=>this.ads.once(e,t)),this.content.once(Qt.OUTSTREAM_TEARDOWN,t=>{setTimeout(()=>{if(t.defaultPrevented)return this.handle_endscreen();this.dispose()},0)})}handle_endscreen(){this.reset_ui(),this.ads.reset(),C({config:this.content.opts,ui:this.adUi,ads:this.ads,adContainer:this.adUi,ima:this.ima,content:this.content,root:this.content.root,state:{started:!0,listening:!1},initial:{muted:!0,volume:1}})}empty_src(){this.content.setSrc({type:"video/mp4",src:URL.createObjectURL(Ht)})}setup(){this.root.classList.add(Outstream.CLASS.OUTSTREAM),this.root.classList.add(Outstream.CLASS.HIDDEN),this.content.setState("ad-linear",!1),this.empty_src()}reset_ui(){const t=this.root;t.classList.remove(Outstream.CLASS.SHOWING),t.classList.remove(Outstream.CLASS.OUTSTREAM)}dispose(){if(this.state==$t.Disposed)return;const t=this.root,e=this.content;this.reset_ui(),t.classList.add(Outstream.CLASS.OUTSTREAM),t.classList.add(Outstream.CLASS.DONE);this.video=this.container=this.ads=0,this.state=$t.Disposed,e.destroy(),t.innerHTML=""}}function Kt(t){return t&&"number"==typeof t.time}function Yt(t){return t&&"number"==typeof t.percentage&&"number"!=typeof t.time}Outstream.CLASS=Wt;const Zt=S("ads/ima/sdk");var Jt,Xt;async function te(t,e){var s;const i=null===(s=null===window||void 0===window?void 0:window.google)||void 0===s?void 0:s.ima;if(e?null==i?void 0:i.dai:i)return void Zt(":noop");const r=e?"https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js":t._storage.getItem("ima/debug")?"https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js":"https://imasdk.googleapis.com/js/sdkloader/ima3.js";try{return await async function(t){return new Promise((e,s)=>{let i=document.querySelector(`script[src='${t}']`);if(i)return ee(i,e,s);i=document.createElement("script"),i.setAttribute("state",Jt.LOADING),ee(i,e,s),i.src=t,document.head.appendChild(i)})}(r),void Zt(":loaded")}catch(t){Zt(":error "+t.message,t)}}function ee(t,e,s){const i=t.getAttribute("state");if(i&&[Jt.ERROR,Jt.LOADED].includes(i))return e(void 0);t.addEventListener("load",()=>{t.setAttribute("state",Jt.LOADED),e(void 0)},{once:!0}),["error","abort"].forEach(e=>{t.addEventListener(e,()=>{t.setAttribute("state",Jt.ERROR),s("script failed to load")},{once:!0})})}!function(t){t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(Jt||(Jt={})),function(t){t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(Xt||(Xt={}));const se=S("ads/ima/sdk"),ie="https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";async function re(t){var e;const s=t._storage.getItem("prebid/debug")?ie:"https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";if(null===(e=null===window||void 0===window?void 0:window.pbjs)||void 0===e?void 0:e.version)se(":noop");else if(!document.querySelector(`script[src='${s}']`))try{return await async function(t){return new Promise((e,s)=>{let i=document.querySelector(`script[src='${t}']`);i||(i=document.createElement("script")),i.setAttribute("state",Xt.LOADING);const r=i.getAttribute("state");if(r&&[Xt.ERROR,Xt.LOADED].includes(r))return e(void 0);i.addEventListener("load",()=>{i.setAttribute("state",Xt.LOADED),e(void 0)},{once:!0}),["error","abort"].forEach(t=>{i.addEventListener(t,()=>{i.setAttribute("state",Xt.ERROR),s("script failed to load")},{once:!0})}),i.src=t,document.head.appendChild(i)})}(s),void se(":loaded")}catch(t){console.warn(":error / failed to load prebid.js / "+t.message,t)}}const ae=window.pbjs=window.pbjs||{};ae.que=ae.que||[];class PrebidAdController{constructor(t,e){this.player=t,this.config=e,this.player=t,this.bestOffer="",ae.que.push(()=>{var s,i;const r=this.createAdUnit();ae.addAdUnits(r);const a=(null===(i=null===(s=e.ads)||void 0===s?void 0:s.prebid)||void 0===i?void 0:i.pbjs)||{};ae.setConfig(Object.assign({enableSendAllBids:!0},a)),t.emit("ad/pbjs",{pbjs:ae}),ae.requestBids({bidsBackHandler:t=>{var s,i,a,n,o;const d=null===(s=t[this.prebidCode()])||void 0===s?void 0:s.bids;if(!d)return;if(0==d.length)return;const l=d[0];if(l&&l.vastUrl)return this.bestOffer=l.vastUrl;const c=ae.adServers.dfp.buildVideoUrl({adUnit:r,params:{iu:null===(a=null===(i=e.ads)||void 0===i?void 0:i.prebid)||void 0===a?void 0:a.iu,cust_params:null===(o=null===(n=e.ads)||void 0===n?void 0:n.prebid)||void 0===o?void 0:o.custom_params,output:"vast"}});this.bestOffer=c}})})}prebidCode(){var t,e;return(null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.code)||this.player.root.id}videoInfo(){var t,e;return(null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.video)||{context:"instream",playerSize:[[this.player.videoWidth||640,this.player.videoHeight||480]]}}createAdUnit(){var t,e;return{code:this.prebidCode(),mediaTypes:{video:this.videoInfo()},bids:null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.bidders}}vastGenerator(){return async()=>this.bestOffer}}function ne(t,e){var s,i;const r=null===(s=e.ads)||void 0===s?void 0:s.prebid;if(!r)return;if((null===(i=t.prebidController)||void 0===i?void 0:i.config)===e)return;t.prebidController||(t.prebidController=new PrebidAdController(t,e),re(t));const a=t.prebidController;if(a){const e=r.breaks.map(t=>({adTag:a.vastGenerator(),time:t}));t.setOpts({ima:{ads:e}})}}const oe=S("ads/index");async function de(t,e,s){var i;let r;if(s.on("config",()=>{var e,i,a;void 0===r&&t.autoplay&&!s.currentSrc&&(a=t.autoplay,r=!0===a?v.ON:!1===a?v.OFF:a,t.autoplay=0),(null===(e=t.ads)||void 0===e?void 0:e.prebid)&&ne(s,t),Array.isArray(null===(i=null==t?void 0:t.ima)||void 0===i?void 0:i.ads)&&V(s)&&Object.assign(t,{hls:{native:!0}}),s.ads&&d()}),s.once("loadstart",()=>{setTimeout(()=>{var e;if(!Array.isArray(null===(e=null==t?void 0:t.ima)||void 0===e?void 0:e.ads)&&void 0!==r){if(t.autoplay=r,s.setState("is-autoplay",!0),!s.hasState(_))return s.once("viewenter",()=>s.togglePlay(!0));s.togglePlay(!0)}},0)}),await te(s),!("google"in window))return console.warn("google.ima unavailable");let a=!1;const n=s.ads=new AdsController,o=n.analytics;function d(){const i=t.ima;if(!i||!Array.isArray(i.ads))return;const d=t.duration||s.duration;if(i.ads=function(t,e){return Array.isArray(t)?t.filter(t=>Kt(t)||Yt(t)).reduce((t,s)=>{if(Kt(s))return t.push(s),t;if(s.lazy)return t.push(s),t;if(Yt(s)){const i=Object.assign({},s),r=s.percentage?s.percentage*e:0;return isNaN(r)||(i.time=r<0||r===e?-1:r),t.push(i),t}return t},[]):(console.warn("AdSchedule was not an Array"),[])}(i.ads,d),n.setSchedule(i.ads,d),t.metadata&&Analytics.mergeMetadata(o,t.metadata),t.metadata&&n.mergeMacros(t.metadata),t.metadata&&i.parameters&&(i.parameters=Object.assign(Object.assign({},i.parameters),t.metadata)),Analytics.mergeMetadata(o,{muted:t.muted||!1,autoplay:t.autoplay||!1}),!a){if(a=!0,t.lang&&!i.Locale&&(i.Locale=t.lang),Schedule.isOutstream(i.ads))return oe("is outstream, returning"),new Outstream({root:e,content:s,ads:n,ima:i});k({config:Object.assign(Object.assign({},t),{autoplay:r}),root:e,content:s,ads:n,ima:i})}}n.resize(h(e)),n.on("ad-postroll-finished",()=>{n.adapter.isCustomPlaybackEnabled()&&n.once("ad-break-completed",()=>{s.src=s.original_src,s.once("canplay",()=>{s.togglePlay(!1)}),s.webkitExitFullscreen()})}),s.on("reap",(function(){n&&n.destroy()})),(null===(i=t.ads)||void 0===i?void 0:i.prebid)&&ne(s,t),d()}class AdControls extends HTMLElement{constructor(t){super(),this.player=t,this.classList.add("fp-ad-controls"),this.append(this.adRemainingTime(),T(this.player,"flowplayer-ad-indicator"),this.playbackButtons(),this.volumeBtn(),T(this.player,"flowplayer-volume-bar"),...this.fullscreenIcons(),this.adChoices()),t.on("ad/set-ui-flags",this.applyStyleFlags.bind(this))}fullscreenIcons(){return this.player.createComponents("flowplayer-fullscreen-enter-icon","flowplayer-fullscreen-exit-icon").map(t=>(t.onclick=()=>this.player.toggleFullScreen(),t))}volumeBtn(){const t=T(this.player,"flowplayer-volume-icon");return t.onclick=()=>this.player.emit("request/ad/muteunmute"),t}playbackButtons(){const t=document.createElement("div");t.classList.add("ad-playback-controls");const e=T(this.player,"flowplayer-small-play-icon"),s=T(this.player,"flowplayer-small-pause-icon");return e.addEventListener("click",()=>{this.player.emit("request/ad/play"),setTimeout((function(){s.focus&&s.focus()}),100)}),s.addEventListener("click",()=>{this.player.emit("request/ad/pause"),setTimeout((function(){e.focus&&e.focus()}),100)}),t.append(e,s),t}adChoices(){const t=document.createElement("div");return t.classList.add("fp-ad-choices"),t.textContent=this.player.i18n("ads.adchoices","AdChoices"),t.addEventListener("click",t=>{t.preventDefault(),this.player.togglePlay(!1),window.open("https://adssettings.google.com","_blank")}),t}adRemainingTime(){const t=document.createElement("div");return t.classList.add("fp-ad-remaining","fp-color-text"),this.prepend(t),this.player.on("ad-progress",e=>{const s=e.detail.remaining;t.textContent=function(t){if(isNaN(t)||t>=Number.MAX_SAFE_INTEGER)return"";const e=t<0?"-":"";t=Math.round(Math.abs(t));const s=Math.floor(t/3600);let i=Math.floor(t/60);return t-=60*i,s>=1?(i-=60*s,e+s+":"+y(i)+":"+y(t)):e+y(i)+":"+y(t)}(parseFloat(s+""))}),t}applyStyleFlags(t){var e;const s=null!==(e=t.detail.ui_flags)&&void 0!==e?e:0;this.classList.toggle("is-ad-controls-sticky",(1&s)>0),this.classList.toggle("no-indicator",(4&s)>0),this.classList.toggle("is-ad-choices",(16&s)>0),this.classList.toggle("no-volume-bar",0==(64&s)),this.classList.toggle("is-ad-remaining",(32&s)>0),this.classList.toggle("no-fullscreen",(2&s)>0)}}class AdCountdown extends HTMLElement{static get observedAttributes(){return["remaining"]}constructor(t){super(),this.player=t,this.className="fp-ad-countdown",t.on("ad-progress",t=>{const{duration:e,remaining:s}=t.detail;this.setAttribute("duration",e+""),this.setAttribute("remaining",s+"")}),t.on("ad-started",t=>{t.detail.linear&&(this.style.setProperty("--ad-percent-previous","0"),this.style.setProperty("--ad-percent-complete","0"))}),this.addEventListener("animationend",()=>{const t=this.style.getPropertyValue("--ad-percent-complete")||"0";this.style.setProperty("--ad-percent-previous",t)})}attributeChangedCallback(t,e,s){switch(t){case"remaining":return this.onRemaining(s)}}onRemaining(t){const e=parseFloat(this.getAttribute("duration")||"0");t||(t=e+"");const s=parseFloat(t),i=this.style.getPropertyValue("--ad-percent-complete")||"0";this.style.setProperty("--ad-percent-previous",i),this.classList.remove("go");const r=((e-s)/e*100).toFixed(3);requestAnimationFrame(()=>{this.style.setProperty("--ad-percent-complete",r),this.classList.add("go")})}}class AdIndicator extends HTMLElement{static get observedAttributes(){return["position","totals"]}constructor(t){super(),this.player=t,this.render(),t.on("ad-started",t=>{const{position:e,totals:s}=t.detail.ad;this.setAttribute("position",e+""),this.setAttribute("totals",s+"")})}attributeChangedCallback(t,e){switch(t){case"position":case"totals":return this.updateText()}}updateText(){if(!this.element)return;const t=parseFloat(this.getAttribute("position")||"0"),e=parseFloat(this.getAttribute("totals")||"0");this.element.textContent=`${this.player.i18n("ads.indicator","ADS")} ${t} / ${e}`}render(){this.element=document.createElement("div"),this.element.classList.add("ad-indicator","fp-color-text"),this.element.textContent=this.player.i18n("ads.indicator","ADS"),this.append(this.element)}}var le,ce=Object.freeze({__proto__:null,SINGlE_INLINE_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_SKIPPABLE_INLINE:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirectlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_ERROR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_BROKEN:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&nofb=1&correlator=",SINGLE_VPAID_20_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinearvpaid2js&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_VPAID_20_NON_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dnonlinearvpaid2js&ciu_szs=728x90%2C300x250&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_NON_LINEAR_INLINE:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/nonlinear_ad_samples&sz=480x70&cust_params=sample_ct%3Dnonlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_SESSION_AD_RULE_PREROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sar%3Da0f2&ciu_szs=300x250&ad_rule=1&gdfp_req=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_PREROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonly&ciu_szs=300x250%2C728x90&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_PREROLL_BUMPER:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_POSTROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonly&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_POSTROLL_BUMPER:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator="});const{samsung_tv:ue}=u(),he=((le=class Ads{constructor(t){this.umd=t,L(t,O,AdUI),L(t,"flowplayer-ad-controls",AdControls),L(t,"flowplayer-ad-countdown",AdCountdown),L(t,"flowplayer-ad-indicator",AdIndicator)}init(t,e,s){if(c.from_token(t.token||"").is_granted(c.permissions.ADS)&&!ue)return de(t,e,s)}}).pluginName="ads",le.events=m,le.ui=Vt,le.tags=ce,le);return function(t,e){if("object"==typeof exports&&"undefined"!=typeof module)return e;if(null===document.currentScript)return e;"flowplayer"in t||(t.flowplayer={extensions:[]});const s=t.flowplayer;return"function"==typeof s?(s(e),e):(Array.isArray(s.extensions)||(s.extensions=[]),~s.extensions.indexOf(e)||s.extensions.push(e),e)}(window,he)}));
|
|
7
|
+
*/const yt=class Bowser{static getParser(t,e=!1){if("string"!=typeof t)throw new Error("UserAgent should be a string");return new Parser(t,e)}static parse(t){return new Parser(t).getResult()}static get BROWSER_MAP(){return ct}static get ENGINE_MAP(){return pt}static get OS_MAP(){return ht}static get PLATFORMS_MAP(){return ut}}.parse(window.navigator.userAgent),{platform:At,os:bt,browser:wt}=yt,Et=t=>t&&t.toLowerCase();var St={rnd:Math.random().toString(36).substr(2,32),os:Et(bt.name+(bt.versionName?" "+bt.versionName:"")),device:Et(At.type),browser:Et(wt.name),browser_version:(wt&&wt.version?wt.version:"unknown").split(".").shift(),plugin_version:"3.28.0-rc.1"};const Tt="https://fp-eu-w1-aai.flowplayer.com/in",Lt="POST",Ot=["ad-requested","ad-request-error","ad-request-completed","ad-completed","ad-started","ad-error","ad-skipped"],Rt=["event_type","ad_tag_id","media_id","player_id","site_id","sitegroup_id","rnd","os","device","browser","browser_version","plugin_version","player_version"],Mt=["vast_error","reason","request_load_time","ad_type","vast_ad_id"],kt=S("ads/analytics"),Pt=RequestQueue.of(),Dt=(...t)=>Object.assign({},...t);class Analytics{static of(t,e){return new Analytics(t,e)}static ensure_required_keys(t,e){return t.required_keys.filter(t=>!(t in e))}static pluck_valid_keys(t,e){return((t,...e)=>Object.keys(t).filter(t=>~e.indexOf(t)).reduce((e,s)=>Object.assign(e,{[s]:t[s]}),{}))(e,...t.valid_keys)}static mergeMetadata(t,e={}){return t.metadata=Analytics.pluck_valid_keys(t,Dt(t.metadata,e,{player_version:"3.28.0-rc.1"})),t}constructor(t,e={}){this.emitter=t,this.metadata=Dt(St,e.metadata||{}),this.emitter=t,this.events=e.events||[],this.required_keys=e.required_keys||[],this.optional_keys=e.optional_keys||[],this.valid_keys=this.required_keys.slice(0).concat(this.optional_keys),kt(this),this.wireup()}wireup(){this.events.forEach(t=>{this.emitter.on(t,e=>{const s=e.detail,i=Dt(this.metadata,{event_type:t},s),r=Analytics.pluck_valid_keys(this,i),a=Analytics.ensure_required_keys(this,r);if(kt(`Event[${t}]`,{payload:r,observation:s}),a.length)return kt(`Analytics.validate_metadata() failed for\n Event[${t}]\n missing keys: ${a}`,r);RequestQueue.rpush(Pt,[Tt,Lt,r])})})}destroy(){this.emitter=this.metadata=this.events=this.required_keys=this.optional_keys=this.valid_keys=void 0}}const It=S("ads/controller"),Ct={show_all_ads_on_seek:!1,timeout:5e3,preload_advance:10};class AdsController extends class EventBus{constructor(t=document.createElement("div"),e=[]){this._bus=t,this._listeners=e}removeAllListeners(){this._listeners.length=0,this._bus=document.createElement("div")}emit(t,e){const s=new CustomEvent(t,{detail:e||{}});this._bus.dispatchEvent(s)}on(t,e){this._listeners.push([t,e]),this._bus.addEventListener(t,e,{passive:!0})}once(t,e){this._bus.addEventListener(t,e,{once:!0})}removeListener(t,e){this._bus.removeEventListener(t,e)}}{constructor(t={}){var e;super(),this.adapter=function(t,e){return t.adapter?new t.adapter(e):new IMA(e)}(t,this),this.opts=Object.assign(Object.assign({},Ct),t),this.analytics=(e=this,Analytics.of(e,{required_keys:Rt,optional_keys:Mt,events:Ot})),this._state=AdsState.of(),this._schedule=void 0,this._lastAd=void 0,this._macros=new Macros(t.parameters||{}),this.wireup(),this.content_processing_src=!1}reset(){return this.removeAllListeners(),this.wireup(),this.analytics&&this.analytics.wireup(),this._state.reset(),this.adapter.reset(),this}destroy(){this.removeAllListeners(),this.analytics&&this.analytics.destroy(),this.adapter&&this.adapter.destroy();this.analytics=void 0,this.opts=void 0,this.adapter=void 0,this._state=void 0,this._schedule=void 0,this._lastAd=void 0,this._macros=void 0}stop(){this.adapter&&this.adapter.stop()}onContentNewSrc(){this._state.reset(),this.adapter.destroyManager(),this.adapter.contentComplete()}wireup(){const t=()=>{var t,e;this.adapter.onAdRequestEnd(),null===(t=this.videoTag)||void 0===t||t.setState("ad-paused",!1),null===(e=this.videoTag)||void 0===e||e.setState("ad-playing",!0),this._state.toggleState(ot.PLAYING,!0)};this.on("ad-play-requested",t),this.on("ad-started",t),this.on("ad-resumed",t);const e=t=>{var e,s;"ad-request-error"!==(null==t?void 0:t.type)&&this.adapter.onAdRequestEnd(),null===(e=this.videoTag)||void 0===e||e.setState("ad-paused","ad-paused"===(null==t?void 0:t.type)),null===(s=this.videoTag)||void 0===s||s.setState("ad-playing",!1),this.adPlaying&&this._state.toggleState(ot.PLAYING,!1)};this.on("ad-break-completed",e),this.on("ad-teardown",e),this.on("ad-playback-error",e),this.on("ad-request-error",e),this.on("ad-paused",e),this.on("ad-skipped",e),this.on("ad-completed",e),this.on("ad-break-completed",()=>{requestAnimationFrame(()=>{this._state.toggleState(ot.BREAK_ACTIVE,!1)})}),this.on("ad-adapter-init-failed",()=>{console.error("Adapter init failed"),e(),this._state.toggleState(ot.FATAL_ERROR,!0)}),this.on("reload-ad-requested",async t=>{if(It("Ads.on(RELOAD_AD_REQUESTED)",t),this._schedule){if(e(),t)return this._schedule.reset(this._schedule.getAds());this._state.hasAny(ot.AD_AVAILABLE)&&(this._schedule.decrement(),this._state.toggleState(ot.AD_AVAILABLE,!1))}})}async initialize(t,e={},s){return It("Ads.initialize():",t,e,s),this._state.toggleState(ot.INITIALIZING,!0),Object.assign(this.opts,e),Array.isArray(t)&&this.setSchedule(t),await this.adapter.init(this.opts),this._macros=this._macros.fork(Object.assign({},e.parameters||{},{autoplay:e.autoplay,muted:e.muted})),this.adapter.isReady()&&await this.adapterInitialized(s),this}get videoTag(){return this.adapter.getVideoTag()}get adInfo(){return this.adapter.getAdInfo()}async setVideoTag(t){It("Ads.setVideoTag():",t),await this.adapter.setVideoTag(t),this.trigger("ad-videotag-attached",t),this.adapter.isReady()&&await this.adapterInitialized(),t.on("request/ad/pause",()=>this.adapter.pause()),t.on("request/ad/play",()=>this.adapter.resume()),t.on("request/ad/muteunmute",()=>t.toggleMute()),t.on("volumechange",()=>{this.adapter.volume(t.muted?0:0==t.volume?.1:t.volume)}),t.on("src",()=>t.hasState("ad-playing")||t.hasState("ad-paused")?(this.stop(),this.adapter.isLinearAd()?(this.setIsContentProcessingNewSrc(!0),void this.once("ad-break-completed",()=>{setTimeout(()=>{this.setIsContentProcessingNewSrc(!1),this.onContentNewSrc()},0)})):this.onContentNewSrc()):this.onContentNewSrc())}waitForVideoTag(){return new Promise(t=>{const e=this.adapter.getVideoTag();if(e)return t(e);this.on("ad-videotag-attached",e=>{this.once(g,()=>t(e))})})}async adapterInitialized(t){It("Ads.adapterInitialized()"),this._state.toggleState(ot.INITIALIZING,!1),this._state.toggleState(ot.BREAK_ACTIVE,!!this.hasPreroll()),await this.setCurrentTime(0,t),this.checkIfBreakComplete(),this.adapter.isAdPod()||t&&!this.opts.autoplay||this.trigger("ad-teardown")}async fetchNextAd(t,e=0){var s,i;if(!this._schedule)return;if(!this.adapter.isReady())return;if(e>50)throw this._state.toggleState(ot.FATAL_ERROR,!0),this._state.toggleState(ot.FETCHING_AD,!1),new Error("Ads.fetchNextAd() :max_recursion_depth");const r=(null===(s=this._schedule)||void 0===s?void 0:s.getNextAd())||(null===(i=this._schedule)||void 0===i?void 0:i.getPostroll());if(!r||this.adapter.canDismissNonLinear()||-1===t)if(this._schedule.waitForLoad(t,r,this.opts.preload_ads))this._state.toggleState(ot.FETCHING_AD,!1);else if(r!==this._schedule.getPostroll()||(this._schedule.setPostrollActive(),-1===t))if(this._schedule.isDrained()||this._schedule.increment(),r){It("Ads.fetchNextAd",r),this._state.toggleState(ot.FETCHING_AD,!0);try{return await this.requestAd(r),this._state.toggleState(ot.AD_AVAILABLE,!0),void this._state.toggleState(ot.FETCHING_AD,!1)}catch(s){return It("Ads.fetchNextAd(err: %o, ad: %o)",s,r),this.setLastAd(r),r!==this._schedule.getPostroll()?await this.fetchNextAd(t,++e):void this._state.toggleState(ot.FETCHING_AD,!1)}}else this._state.toggleState(ot.FETCHING_AD,!1);else this._state.toggleState(ot.FETCHING_AD,!1)}skipAdsOnSeek(t){if(!this._schedule)return;let e=this._schedule.getNextAd();for(;e&&e.time<t;)this._schedule.increment(),e=this._schedule.getNextAd()}async setCurrentTime(t,e=!1,s=!1){if(!this._schedule)return;if(!this.adapter.isReady())return;if(this._state.hasAny(ot.FETCHING_AD))return;if(this._state.hasAny(ot.PLAYING)&&this.adapter.isLinearAd())return;const i=0===t&&0===this._schedule.getNextIndex();try{if(s&&!this.opts.show_all_ads_on_seek&&this.skipAdsOnSeek(t),this._state.hasAny(ot.AD_AVAILABLE)||await this.fetchNextAd(t),!this._state.hasAny(ot.AD_AVAILABLE)||!this.shallPlayAd(t)||e)return;await this.playAd(),await this.setCurrentTime(t),this.checkIfBreakComplete()}catch(t){It("setCurrentTime: Error(from: setCurrentTime, message: %s)",t.message)}finally{i&&this.trigger("ad-preroll-finished")}}async playAd(){var t;if(!this._state.hasAny(ot.AD_AVAILABLE))return;this._state.toggleState(ot.AD_AVAILABLE,!1),this._state.toggleState(ot.BREAK_ACTIVE,!0);const e=null===(t=this._schedule)||void 0===t?void 0:t.getCurrentAd();try{await this.adapter.playAd()}catch(t){console.error("Ads.playAd: error",t)}finally{e&&this.setLastAd(e)}}checkIfBreakComplete(){if(!this._state.hasAny(ot.BREAK_ACTIVE))return It("Ads.checkIfBreakComplete(:bail, ad: %o)",this.getLastAd());It("Ads.checkIfBreakComplete(:run, ad: %o)",this.getLastAd()),this._state.toggleState(ot.BREAK_ACTIVE,!1),this.adapter.isAdPod()||this.trigger("ad-break-completed")}resetScheduleCounter(){this._schedule&&this._schedule.resetCounter()}setSchedule(t,e){if(e&&!isNaN(e)&&this._schedule&&this._schedule.updateContentDuration(e),this._schedule&&this._schedule.getNextIndex()>0)return this._schedule.setAds(t);this._schedule=new Schedule(t,{preload_advance:this.opts.preload_advance,content_duration:e?0:e})}toJSON(){return this._schedule?this._schedule.toJSON():[]}trigger(t,e={}){var s;if(!this.adapter.getVideoTag())return;if(!this._state)return;if("ad-break-completed"===t&&this._state.hasAny(ot.BREAK_ACTIVE)&&!this.adapter.isAdPod())return It("skipping AD_BREAK_COMPLETE reason: %s pod=%s",this._state.toString(),this.adapter.isAdPod());if(null===(i=e)||"object"!=typeof i||at(i)!==rt)return this.dispatch(t,e);var i;const r=Object.assign({},this.adapter.getOpts()||{},(null===(s=this._schedule)||void 0===s?void 0:s.getCurrentAd())||{},{ad_type:this.ad_type},e);return this.dispatch(t,r)}dispatch(t,e){const s=this.adapter.getVideoTag();if(s){It(":dispatch",t,e),this.adapter.isAdPod()&&"object"==typeof e&&"time"in e&&"preroll"!==e.ad_type&&(e.time=this.adapter.getAdBreakTime());try{const i={event:"ads/"+t,detail:{outstream:e.outstream,ad_type:e.ad_type,ad_break_time:e.time,ad_remaining_seconds:e.remaining,ad_muted:e.muted,ad_duration_seconds:e.duration,ad_error_reason:e.reason,ad_vast_error:e.vast_error,ad_vast_error_type:e.vast_error_type,ad_request_load_type:e.request_load_time}};s.dispatchEvent(new CustomEvent("health:record",{detail:i}))}catch(t){It(":error",t)}f(s,t,e),this.emit(t,e)}}get ad_type(){if(!this.videoTag)return;if(!this.adapter.isAdPod())return this._schedule&&this._schedule.getCurrentType();const t=this.adapter.getAdBreakTime();return-1===t?"postroll":this.videoTag.hasState("is-live")||t<1?"preroll":"midroll"}shouldRestartContent(){if(this.getIsContentProcessingNewSrc())return!1;if(this.adapter.isAdPod())return!0;const t=this.getLastAd();return!t||!t.outstream&&!1!==t.restart}async finished(t){if(this._schedule&&(It("Ads.finished"),!(this.adapter.isCustomPlaybackEnabled()&&this._state.hasAny(ot.PLAYING)&&this.adapter.isLinearAd()))){It("Ads.finished: trying to play postroll");try{if(!this._schedule.getPostroll())return It("Ads.finished: no postroll found"),await this.adapter.contentComplete();this._state.hasAny(ot.AD_AVAILABLE)||await this.fetchNextAd(-1),await this.playAd(),this.adapter.contentComplete()}catch(t){It("Ads.finished: postroll failed:",t)}finally{this.trigger("ad-postroll-finished"),this.checkIfBreakComplete(),"function"==typeof t&&t()}}}hasPreroll(){return this._schedule&&Schedule.hasPreroll(this._schedule.getAds())}shallPlayAd(t){var e;return(!this.adapter||!this.adapter.isAdPod())&&(!(!this._state||this._state.hasAny(ot.FATAL_ERROR))&&!!(null===(e=this._schedule)||void 0===e?void 0:e.shallPlayAd(t)))}setLastAd(t){return this._lastAd=t,this}setIsContentProcessingNewSrc(t){this.content_processing_src=t}getLastAd(){return this._lastAd}getIsContentProcessingNewSrc(){return this.content_processing_src}mergeMacros(t={}){return this._macros=this._macros.fork(Object.assign({},t)),this}get paused(){return this.adapter&&this.adapter.isPaused()}pause(){this.adapter&&this.adapter.pause()}resume(){this.adapter&&this.adapter.resume()}resize(t){this.adapter&&this.adapter.onResize(t)}async requestAd(t,e=0,s=this.opts.timeout){if(!this._state)return;It("Ads.requestAd(ad: %o)",{ad:t,timeout:s,idx:e});const i=await async function t(e){if("function"==typeof e)return[await it(e)];if("string"==typeof e)return[await it(e)];if(Array.isArray(e)){const t=e;return await Promise.all(t.map(it))}if("object"==typeof e&&e&&e.adTag)return await t(e.adTag);throw new Error(`\n unhandled ads type ${typeof e}:\n ${JSON.stringify(e)}\n can be:\n | Array<string>\n | string\n | function\n | {adTag: Array<string>|string|function}\n `)}(t);if(void 0===i[e])return setTimeout(()=>this.trigger("ad-teardown"),0),Promise.reject(new Error("Ad failed, no fallbacks left"));if(!i[e])return await this.requestAd(i,e+1,s);this.trigger("ad-requested",t);const r=this._macros.compile(i[e],et(this.opts,this.adapter.getDimensions()));try{return void await this.adapter.initAd(r,s)}catch(t){return It(`Ads.requestAd(:fallback, idx: ${e}, length: ${i.length}, adTag: ${i[e]})\nError `,{adTag:i,err:t}),this.requestAd(i,e+1,s)}}resetSchedule(t){this._schedule&&this._schedule.reset(t)}get adPlaying(){return this._state&&this._state.hasAny(ot.PLAYING)}get adBreak(){return this._state&&this._state.hasAny(ot.BREAK_ACTIVE)}get adRequesting(){return this._state.hasAny(ot.FETCHING_AD)}get adLinear(){return this.adBreak&&this.adapter.isLinearAd()}}var Nt=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),Ut=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function xt(t){return Object.assign({muted:!1,timeout:250,inline:!1},t)}function Ft(t,e){var s=t.muted,i=t.timeout,r=t.inline,a=e(),n=a.element,o=a.source,d=void 0,l=void 0,c=void 0;return n.muted=s,!0===s&&n.setAttribute("muted","muted"),!0===r&&n.setAttribute("playsinline","playsinline"),n.src=o,new Promise((function(t){d=n.play(),l=setTimeout((function(){c(!1,new Error("Timeout "+i+" ms has been reached"))}),i),c=function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n.remove(),n.srcObject=null,clearTimeout(l),t({result:e,error:s})},void 0!==d?d.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var qt={audio:function(t){return Ft(t=xt(t),(function(){return{element:document.createElement("audio"),source:URL.createObjectURL(Nt)}}))},video:function(t){return Ft(t=xt(t),(function(){return{element:document.createElement("video"),source:URL.createObjectURL(Ut)}}))}};let Bt=void 0;async function jt(t=!0){return Bt||(Bt=await qt.video({timeout:500,muted:t}),Bt)}const Ht=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});var Vt=Object.freeze({__proto__:null,STICKY_CONTROLS:1,NO_FULLSCREEN:2,NO_AD_INDICATOR:4,AD_ATTRIBUTION:8,AD_CHOICES:16,REMAINING_TIME:32,VOLUME_BAR:64});const zt=["progress","duration","remaining"];class AdUI extends HTMLElement{static get observedAttributes(){return zt}constructor(t){super(),this.player=t,this.className="fp-ad-ui",this.append(...t.createComponents("flowplayer-ad-controls","flowplayer-ad-countdown")),t.on("ad/set-ui-flags",t=>{let{ui_flags:e}=t.detail;if(e=e||0,(8&e)>0){const t=document.createElement("div");t.classList.add("ad-attribution"),t.textContent=this.player.i18n("ads.advertisement","Advertisement"),this.append(t)}})}}const Gt=S("fpads:native:outstream"),Wt={OUTSTREAM:"is-outstream",HIDDEN:"is-outstream-hidden",SHOWING:"is-outstream-visible",DONE:"is-outstream-done"};var Qt,$t;!function(t){t.OUTSTREAM_VISIBLE="ads-outstream-visible",t.OUTSTREAM_VIEWPORT_UPDATE="ads-outstream-viewport-update",t.OUTSTREAM_TEARDOWN="ads-outstream-teardown",t.OUTSTREAM_ENDSCREEN_READY="ads-outstream-endscreen-ready"}(Qt||(Qt={})),function(t){t[t.None=0]="None",t[t.Booting=1]="Booting",t[t.Ready=2]="Ready",t[t.Disposed=3]="Disposed"}($t||($t={}));class Outstream{constructor({ads:t,root:e,content:s,ima:i}){this.state=$t.None,Gt("creating Outstream instance"),this.content=s,this.ads=t,this.root=e,this.ima=i,this.aspectRatio=s.videoHeight/s.videoWidth,this.dimensions=function(t){if(t.clientWidth>0||t.clientHeight)return h(t);const e={height:t.style.height};p(t,"opacity",0),p(t,"display","absolute"),p(t,"display","inline-block"),p(t,"height","auto");const s=h(t);return p(t,"height",e.height),p(t,"opacity",1),s}(this.root),this.adUi=new AdUI(s),this.initialVolumeState={},e.classList.add(Wt.OUTSTREAM),e.append(this.adUi),this.hide(),this.ads.on("ad-pause-content",t=>{var e;if(this.state==$t.Disposed)return;const s=!!(null===(e=t.detail)||void 0===e?void 0:e.linear);this.ads.resize(Object.assign(Object.assign({},this.dimensions),{linear:s}))}),s.on("resize",t=>{if(this.state==$t.Disposed)return;const e=t.detail;e&&(this.dimensions={width:e.contentRect.width,height:e.contentRect.height},this.ads.resize(this.dimensions))});let r=1,a=!0;s.on("intersectionchange",t=>{if(this.state==$t.Disposed)return;const e=t.detail;if(e)switch(this.state){case $t.Booting:return Gt(":boot skipping intersectionchange");case $t.None:return this.state=$t.Booting,this.begin_life_cycle();case $t.Ready:if(r=e.ratio,e.ratio>=.5&&this.ads.adPlaying)return;e.ratio>=.5&&a&&this.ads.resume(),e.ratio<.5&&this.ads.pause()}}),this.content.on("ad-paused",()=>a=r<.5),this.setup(),setTimeout(()=>(this.state=$t.Booting,this.begin_life_cycle()),0)}hide(){return this}restore_aspect_ratio(){return Gt(`Outstream.restore_aspect_ratio(${this.aspectRatio})`),this.content.setOpts({ratio:this.aspectRatio}),this}show(){this.root.classList.remove(Outstream.CLASS.HIDDEN),this.root.classList.add(Outstream.CLASS.SHOWING),this.content.setState("ad-linear",!0)}async begin_life_cycle(){var t;this.state=$t.Ready;const{error:e,result:s}=await jt(!1),{result:i}=await jt(!0);this.content.emit("ad/set-ui-flags",{ui_flags:null===(t=this.content.opts.ads)||void 0===t?void 0:t.ui}),this.attach_ad_listeners(),this.initialVolumeState={can_autoplay:!(!s&&!i),muted:!s},Gt("Outstream.show() :autoplay >> sound="+s),e&&this.content&&!s&&(this.content.muted=!0,this.content.volume=0),await this.ads.setVideoTag(this.content),await P({ads:this.ads,content:this.content,adContainer:this.adUi,ima:this.ima,state:{listening:!1},config:this.content.opts}),U({content:this.content,ads:this.ads}),this.state=$t.Ready}attach_ad_listeners(){this.ads.once("ad-pause-content",()=>{this.show(),this.ads.adPlaying&&this.ads.pause()});const t=()=>{M.forEach(e=>this.ads.removeListener(e,t));const e=new CustomEvent(Qt.OUTSTREAM_TEARDOWN);Gt("Outstream(:teardown)",e),this.content.dispatchEvent(e)};M.forEach(e=>this.ads.once(e,t)),this.content.once(Qt.OUTSTREAM_TEARDOWN,t=>{setTimeout(()=>{if(t.defaultPrevented)return this.handle_endscreen();this.dispose()},0)})}handle_endscreen(){this.reset_ui(),this.ads.reset(),C({config:this.content.opts,ui:this.adUi,ads:this.ads,adContainer:this.adUi,ima:this.ima,content:this.content,root:this.content.root,state:{started:!0,listening:!1},initial:{muted:!0,volume:1}})}empty_src(){this.content.setSrc({type:"video/mp4",src:URL.createObjectURL(Ht)})}setup(){this.root.classList.add(Outstream.CLASS.OUTSTREAM),this.root.classList.add(Outstream.CLASS.HIDDEN),this.content.setState("ad-linear",!1),this.empty_src()}reset_ui(){const t=this.root;t.classList.remove(Outstream.CLASS.SHOWING),t.classList.remove(Outstream.CLASS.OUTSTREAM)}dispose(){if(this.state==$t.Disposed)return;const t=this.root,e=this.content;this.reset_ui(),t.classList.add(Outstream.CLASS.OUTSTREAM),t.classList.add(Outstream.CLASS.DONE);this.video=this.container=this.ads=0,this.state=$t.Disposed,e.destroy(),t.innerHTML=""}}function Kt(t){return t&&"number"==typeof t.time}function Yt(t){return t&&"number"==typeof t.percentage&&"number"!=typeof t.time}Outstream.CLASS=Wt;const Zt=S("ads/ima/sdk");var Jt,Xt;async function te(t,e){var s;const i=null===(s=null===window||void 0===window?void 0:window.google)||void 0===s?void 0:s.ima;if(e?null==i?void 0:i.dai:i)return void Zt(":noop");const r=e?"https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js":t._storage.getItem("ima/debug")?"https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js":"https://imasdk.googleapis.com/js/sdkloader/ima3.js";try{return await async function(t){return new Promise((e,s)=>{let i=document.querySelector(`script[src='${t}']`);if(i)return ee(i,e,s);i=document.createElement("script"),i.setAttribute("state",Jt.LOADING),ee(i,e,s),i.src=t,document.head.appendChild(i)})}(r),void Zt(":loaded")}catch(t){Zt(":error "+t.message,t)}}function ee(t,e,s){const i=t.getAttribute("state");if(i&&[Jt.ERROR,Jt.LOADED].includes(i))return e(void 0);t.addEventListener("load",()=>{t.setAttribute("state",Jt.LOADED),e(void 0)},{once:!0}),["error","abort"].forEach(e=>{t.addEventListener(e,()=>{t.setAttribute("state",Jt.ERROR),s("script failed to load")},{once:!0})})}!function(t){t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(Jt||(Jt={})),function(t){t.LOADING="loading",t.LOADED="loaded",t.ERROR="error"}(Xt||(Xt={}));const se=S("ads/ima/sdk"),ie="https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";async function re(t){var e;const s=t._storage.getItem("prebid/debug")?ie:"https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";if(null===(e=null===window||void 0===window?void 0:window.pbjs)||void 0===e?void 0:e.version)se(":noop");else if(!document.querySelector(`script[src='${s}']`))try{return await async function(t){return new Promise((e,s)=>{let i=document.querySelector(`script[src='${t}']`);i||(i=document.createElement("script")),i.setAttribute("state",Xt.LOADING);const r=i.getAttribute("state");if(r&&[Xt.ERROR,Xt.LOADED].includes(r))return e(void 0);i.addEventListener("load",()=>{i.setAttribute("state",Xt.LOADED),e(void 0)},{once:!0}),["error","abort"].forEach(t=>{i.addEventListener(t,()=>{i.setAttribute("state",Xt.ERROR),s("script failed to load")},{once:!0})}),i.src=t,document.head.appendChild(i)})}(s),void se(":loaded")}catch(t){console.warn(":error / failed to load prebid.js / "+t.message,t)}}const ae=window.pbjs=window.pbjs||{};ae.que=ae.que||[];class PrebidAdController{constructor(t,e){this.player=t,this.config=e,this.player=t,this.bestOffer="",ae.que.push(()=>{var s,i;const r=this.createAdUnit();ae.addAdUnits(r);const a=(null===(i=null===(s=e.ads)||void 0===s?void 0:s.prebid)||void 0===i?void 0:i.pbjs)||{};ae.setConfig(Object.assign({enableSendAllBids:!0},a)),t.emit("ad/pbjs",{pbjs:ae}),ae.requestBids({bidsBackHandler:t=>{var s,i,a,n,o;const d=null===(s=t[this.prebidCode()])||void 0===s?void 0:s.bids;if(!d)return;if(0==d.length)return;const l=d[0];if(l&&l.vastUrl)return this.bestOffer=l.vastUrl;const c=ae.adServers.dfp.buildVideoUrl({adUnit:r,params:{iu:null===(a=null===(i=e.ads)||void 0===i?void 0:i.prebid)||void 0===a?void 0:a.iu,cust_params:null===(o=null===(n=e.ads)||void 0===n?void 0:n.prebid)||void 0===o?void 0:o.custom_params,output:"vast"}});this.bestOffer=c}})})}prebidCode(){var t,e;return(null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.code)||this.player.root.id}videoInfo(){var t,e;return(null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.video)||{context:"instream",playerSize:[[this.player.videoWidth||640,this.player.videoHeight||480]]}}createAdUnit(){var t,e;return{code:this.prebidCode(),mediaTypes:{video:this.videoInfo()},bids:null===(e=null===(t=this.config.ads)||void 0===t?void 0:t.prebid)||void 0===e?void 0:e.bidders}}vastGenerator(){return async()=>this.bestOffer}}function ne(t,e){var s,i;const r=null===(s=e.ads)||void 0===s?void 0:s.prebid;if(!r)return;if((null===(i=t.prebidController)||void 0===i?void 0:i.config)===e)return;t.prebidController||(t.prebidController=new PrebidAdController(t,e),re(t));const a=t.prebidController;if(a){const e=r.breaks.map(t=>({adTag:a.vastGenerator(),time:t}));t.setOpts({ima:{ads:e}})}}const oe=S("ads/index");async function de(t,e,s){var i;let r;if(s.on("config",()=>{var e,i,a;void 0===r&&t.autoplay&&!s.currentSrc&&(a=t.autoplay,r=!0===a?v.ON:!1===a?v.OFF:a,t.autoplay=0),(null===(e=t.ads)||void 0===e?void 0:e.prebid)&&ne(s,t),Array.isArray(null===(i=null==t?void 0:t.ima)||void 0===i?void 0:i.ads)&&V(s)&&Object.assign(t,{hls:{native:!0}}),s.ads&&d()}),s.once("loadstart",()=>{setTimeout(()=>{var e;if(!Array.isArray(null===(e=null==t?void 0:t.ima)||void 0===e?void 0:e.ads)&&void 0!==r){if(t.autoplay=r,s.setState("is-autoplay",!0),!s.hasState(_))return s.once("viewenter",()=>s.togglePlay(!0));s.togglePlay(!0)}},0)}),await te(s),!("google"in window))return console.warn("google.ima unavailable");let a=!1;const n=s.ads=new AdsController,o=n.analytics;function d(){const i=t.ima;if(!i||!Array.isArray(i.ads))return;const d=t.duration||s.duration;if(i.ads=function(t,e){return Array.isArray(t)?t.filter(t=>Kt(t)||Yt(t)).reduce((t,s)=>{if(Kt(s))return t.push(s),t;if(s.lazy)return t.push(s),t;if(Yt(s)){const i=Object.assign({},s),r=s.percentage?s.percentage*e:0;return isNaN(r)||(i.time=r<0||r===e?-1:r),t.push(i),t}return t},[]):(console.warn("AdSchedule was not an Array"),[])}(i.ads,d),n.setSchedule(i.ads,d),t.metadata&&Analytics.mergeMetadata(o,t.metadata),t.metadata&&n.mergeMacros(t.metadata),t.metadata&&i.parameters&&(i.parameters=Object.assign(Object.assign({},i.parameters),t.metadata)),Analytics.mergeMetadata(o,{muted:t.muted||!1,autoplay:t.autoplay||!1}),!a){if(a=!0,t.lang&&!i.Locale&&(i.Locale=t.lang),Schedule.isOutstream(i.ads))return oe("is outstream, returning"),new Outstream({root:e,content:s,ads:n,ima:i});k({config:Object.assign(Object.assign({},t),{autoplay:r}),root:e,content:s,ads:n,ima:i})}}n.resize(h(e)),n.on("ad-postroll-finished",()=>{n.adapter.isCustomPlaybackEnabled()&&n.once("ad-break-completed",()=>{s.src=s.original_src,s.once("canplay",()=>{s.togglePlay(!1)}),s.webkitExitFullscreen()})}),s.on("reap",(function(){n&&n.destroy()})),(null===(i=t.ads)||void 0===i?void 0:i.prebid)&&ne(s,t),d()}class AdControls extends HTMLElement{constructor(t){super(),this.player=t,this.classList.add("fp-ad-controls"),this.append(this.adRemainingTime(),T(this.player,"flowplayer-ad-indicator"),this.playbackButtons(),this.volumeBtn(),T(this.player,"flowplayer-volume-bar"),...this.fullscreenIcons(),this.adChoices()),t.on("ad/set-ui-flags",this.applyStyleFlags.bind(this))}fullscreenIcons(){return this.player.createComponents("flowplayer-fullscreen-enter-icon","flowplayer-fullscreen-exit-icon").map(t=>(t.onclick=()=>this.player.toggleFullScreen(),t))}volumeBtn(){const t=T(this.player,"flowplayer-volume-icon");return t.onclick=()=>this.player.emit("request/ad/muteunmute"),t}playbackButtons(){const t=document.createElement("div");t.classList.add("ad-playback-controls");const e=T(this.player,"flowplayer-small-play-icon"),s=T(this.player,"flowplayer-small-pause-icon");return e.addEventListener("click",()=>{this.player.emit("request/ad/play"),setTimeout((function(){s.focus&&s.focus()}),100)}),s.addEventListener("click",()=>{this.player.emit("request/ad/pause"),setTimeout((function(){e.focus&&e.focus()}),100)}),t.append(e,s),t}adChoices(){const t=document.createElement("div");return t.classList.add("fp-ad-choices"),t.textContent=this.player.i18n("ads.adchoices","AdChoices"),t.addEventListener("click",t=>{t.preventDefault(),this.player.togglePlay(!1),window.open("https://adssettings.google.com","_blank")}),t}adRemainingTime(){const t=document.createElement("div");return t.classList.add("fp-ad-remaining","fp-color-text"),this.prepend(t),this.player.on("ad-progress",e=>{const s=e.detail.remaining;t.textContent=function(t){if(isNaN(t)||t>=Number.MAX_SAFE_INTEGER)return"";const e=t<0?"-":"";t=Math.round(Math.abs(t));const s=Math.floor(t/3600);let i=Math.floor(t/60);return t-=60*i,s>=1?(i-=60*s,e+s+":"+y(i)+":"+y(t)):e+y(i)+":"+y(t)}(parseFloat(s+""))}),t}applyStyleFlags(t){var e;const s=null!==(e=t.detail.ui_flags)&&void 0!==e?e:0;this.classList.toggle("is-ad-controls-sticky",(1&s)>0),this.classList.toggle("no-indicator",(4&s)>0),this.classList.toggle("is-ad-choices",(16&s)>0),this.classList.toggle("no-volume-bar",0==(64&s)),this.classList.toggle("is-ad-remaining",(32&s)>0),this.classList.toggle("no-fullscreen",(2&s)>0)}}class AdCountdown extends HTMLElement{static get observedAttributes(){return["remaining"]}constructor(t){super(),this.player=t,this.className="fp-ad-countdown",t.on("ad-progress",t=>{const{duration:e,remaining:s}=t.detail;this.setAttribute("duration",e+""),this.setAttribute("remaining",s+"")}),t.on("ad-started",t=>{t.detail.linear&&(this.style.setProperty("--ad-percent-previous","0"),this.style.setProperty("--ad-percent-complete","0"))}),this.addEventListener("animationend",()=>{const t=this.style.getPropertyValue("--ad-percent-complete")||"0";this.style.setProperty("--ad-percent-previous",t)})}attributeChangedCallback(t,e,s){switch(t){case"remaining":return this.onRemaining(s)}}onRemaining(t){const e=parseFloat(this.getAttribute("duration")||"0");t||(t=e+"");const s=parseFloat(t),i=this.style.getPropertyValue("--ad-percent-complete")||"0";this.style.setProperty("--ad-percent-previous",i),this.classList.remove("go");const r=((e-s)/e*100).toFixed(3);requestAnimationFrame(()=>{this.style.setProperty("--ad-percent-complete",r),this.classList.add("go")})}}class AdIndicator extends HTMLElement{static get observedAttributes(){return["position","totals"]}constructor(t){super(),this.player=t,this.render(),t.on("ad-started",t=>{const{position:e,totals:s}=t.detail.ad;this.setAttribute("position",e+""),this.setAttribute("totals",s+"")})}attributeChangedCallback(t,e){switch(t){case"position":case"totals":return this.updateText()}}updateText(){if(!this.element)return;const t=parseFloat(this.getAttribute("position")||"0"),e=parseFloat(this.getAttribute("totals")||"0");this.element.textContent=`${this.player.i18n("ads.indicator","ADS")} ${t} / ${e}`}render(){this.element=document.createElement("div"),this.element.classList.add("ad-indicator","fp-color-text"),this.element.textContent=this.player.i18n("ads.indicator","ADS"),this.append(this.element)}}var le,ce=Object.freeze({__proto__:null,SINGlE_INLINE_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_SKIPPABLE_INLINE:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirectlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_ERROR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_REDIRECT_BROKEN:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dredirecterror&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&nofb=1&correlator=",SINGLE_VPAID_20_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinearvpaid2js&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_VPAID_20_NON_LINEAR:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dnonlinearvpaid2js&ciu_szs=728x90%2C300x250&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",SINGLE_NON_LINEAR_INLINE:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/nonlinear_ad_samples&sz=480x70&cust_params=sample_ct%3Dnonlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_SESSION_AD_RULE_PREROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sar%3Da0f2&ciu_szs=300x250&ad_rule=1&gdfp_req=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_PREROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonly&ciu_szs=300x250%2C728x90&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_PREROLL_BUMPER:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpreonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_POSTROLL:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonly&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator=",VMAP_POSTROLL_BUMPER:"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpostonlybumper&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&correlator="});const{samsung_tv:ue}=u(),he=((le=class Ads{constructor(t){this.umd=t,L(t,O,AdUI),L(t,"flowplayer-ad-controls",AdControls),L(t,"flowplayer-ad-countdown",AdCountdown),L(t,"flowplayer-ad-indicator",AdIndicator)}init(t,e,s){if(c.from_token(t.token||"").is_granted(c.permissions.ADS)&&!ue)return de(t,e,s)}}).pluginName="ads",le.events=m,le.ui=Vt,le.tags=ce,le);return function(t,e){if("object"==typeof exports&&"undefined"!=typeof module)return e;if(null===document.currentScript)return e;"flowplayer"in t||(t.flowplayer={extensions:[]});const s=t.flowplayer;return"function"==typeof s?(s(e),e):(Array.isArray(s.extensions)||(s.extensions=[]),~s.extensions.indexOf(e)||s.extensions.push(e),e)}(window,he)}));
|