stormcloud-video-player 0.8.59 → 0.8.60
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/LICENSE +21 -21
- package/README.md +1369 -1369
- package/dist/stormcloud-vp.min.js +3 -1
- package/lib/Player.cjs +548 -0
- package/lib/Player.cjs.map +1 -0
- package/lib/Player.d.cts +146 -0
- package/lib/{index.js → StormcloudPlayer.cjs} +1108 -1877
- package/lib/StormcloudPlayer.cjs.map +1 -0
- package/lib/{index.d.ts → StormcloudPlayer.d.cts} +7 -400
- package/lib/index.cjs +979 -251
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +18 -4032
- package/lib/patterns.cjs +111 -0
- package/lib/patterns.cjs.map +1 -0
- package/lib/patterns.d.cts +14 -0
- package/lib/player/AdBreakOrchestrator.cjs +48 -14
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +3 -1
- package/lib/player/AdConfigManager.cjs +155 -17
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.cjs.map +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/HlsEngine.d.cts +1 -1
- package/lib/player/PlaceholderLayer.cjs.map +1 -1
- package/lib/player/PlayerControls.cjs.map +1 -1
- package/lib/player/PlayerControls.d.cts +1 -1
- package/lib/player/Scte35CueManager.cjs.map +1 -1
- package/lib/player/Scte35CueManager.d.cts +1 -1
- package/lib/player/Scte35Parser.cjs.map +1 -1
- package/lib/player/Scte35Parser.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +979 -251
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/player/playerTypes.cjs.map +1 -1
- package/lib/player/playerTypes.d.cts +1 -1
- package/lib/players/FilePlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +979 -251
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +979 -251
- package/lib/players/index.cjs.map +1 -1
- package/lib/props.cjs +186 -0
- package/lib/props.cjs.map +1 -0
- package/lib/props.d.cts +62 -0
- package/lib/sdk/hlsAdPlayer.cjs +884 -234
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/pal.cjs.map +1 -1
- package/lib/types.cjs +49 -0
- package/lib/types.cjs.map +1 -0
- package/lib/{types-52ASml2N.d.cts → types.d.cts} +47 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +979 -251
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/ctvVastSignals.cjs +155 -17
- package/lib/utils/ctvVastSignals.cjs.map +1 -1
- package/lib/utils/devUrl.cjs.map +1 -1
- package/lib/utils/polyfills.cjs.map +1 -1
- package/lib/utils/tracking.cjs +42 -14
- package/lib/utils/tracking.cjs.map +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/lib/utils/trackingIngest.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.cjs +167 -17
- package/lib/utils/vastEnvironmentSignals.cjs.map +1 -1
- package/lib/utils/vastEnvironmentSignals.d.cts +12 -1
- package/lib/utils/vastMacros.cjs +26 -0
- package/lib/utils/vastMacros.cjs.map +1 -1
- package/lib/utils/vastTrackingMacros.cjs +5 -0
- package/lib/utils/vastTrackingMacros.cjs.map +1 -1
- package/lib/utils/vastTrackingMacros.d.cts +2 -0
- package/lib/utils.cjs +292 -0
- package/lib/utils.cjs.map +1 -0
- package/lib/utils.d.cts +17 -0
- package/package.json +91 -91
- package/rollup.config.js +90 -90
- package/lib/index.js.map +0 -1
package/lib/Player.cjs
ADDED
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _assert_this_initialized(self) {
|
|
3
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
return self;
|
|
5
|
+
}
|
|
6
|
+
function _call_super(_this, derived, args) {
|
|
7
|
+
derived = _get_prototype_of(derived);
|
|
8
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
9
|
+
}
|
|
10
|
+
function _class_call_check(instance, Constructor) {
|
|
11
|
+
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
12
|
+
}
|
|
13
|
+
function _defineProperties(target, props) {
|
|
14
|
+
for(var i = 0; i < props.length; i++){
|
|
15
|
+
var descriptor = props[i];
|
|
16
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
17
|
+
descriptor.configurable = true;
|
|
18
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
19
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
23
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
24
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
25
|
+
return Constructor;
|
|
26
|
+
}
|
|
27
|
+
function _define_property(obj, key, value) {
|
|
28
|
+
if (key in obj) {
|
|
29
|
+
Object.defineProperty(obj, key, {
|
|
30
|
+
value: value,
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true
|
|
34
|
+
});
|
|
35
|
+
} else obj[key] = value;
|
|
36
|
+
return obj;
|
|
37
|
+
}
|
|
38
|
+
function _get_prototype_of(o) {
|
|
39
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
40
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
41
|
+
};
|
|
42
|
+
return _get_prototype_of(o);
|
|
43
|
+
}
|
|
44
|
+
function _inherits(subClass, superClass) {
|
|
45
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
46
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
47
|
+
}
|
|
48
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
49
|
+
constructor: {
|
|
50
|
+
value: subClass,
|
|
51
|
+
writable: true,
|
|
52
|
+
configurable: true
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
56
|
+
}
|
|
57
|
+
function _instanceof(left, right) {
|
|
58
|
+
"@swc/helpers - instanceof";
|
|
59
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
60
|
+
return !!right[Symbol.hasInstance](left);
|
|
61
|
+
} else return left instanceof right;
|
|
62
|
+
}
|
|
63
|
+
function _is_native_reflect_construct() {
|
|
64
|
+
try {
|
|
65
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
66
|
+
} catch (_) {}
|
|
67
|
+
return (_is_native_reflect_construct = function() {
|
|
68
|
+
return !!result;
|
|
69
|
+
})();
|
|
70
|
+
}
|
|
71
|
+
function _object_spread(target) {
|
|
72
|
+
for(var i = 1; i < arguments.length; i++){
|
|
73
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
74
|
+
var ownKeys = Object.keys(source);
|
|
75
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
76
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
77
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
ownKeys.forEach(function(key) {
|
|
81
|
+
_define_property(target, key, source[key]);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return target;
|
|
85
|
+
}
|
|
86
|
+
function ownKeys(object, enumerableOnly) {
|
|
87
|
+
var keys = Object.keys(object);
|
|
88
|
+
if (Object.getOwnPropertySymbols) {
|
|
89
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
90
|
+
if (enumerableOnly) {
|
|
91
|
+
symbols = symbols.filter(function(sym) {
|
|
92
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
keys.push.apply(keys, symbols);
|
|
96
|
+
}
|
|
97
|
+
return keys;
|
|
98
|
+
}
|
|
99
|
+
function _object_spread_props(target, source) {
|
|
100
|
+
source = source != null ? source : {};
|
|
101
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
102
|
+
else {
|
|
103
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
104
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return target;
|
|
108
|
+
}
|
|
109
|
+
function _possible_constructor_return(self, call) {
|
|
110
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) return call;
|
|
111
|
+
return _assert_this_initialized(self);
|
|
112
|
+
}
|
|
113
|
+
function _set_prototype_of(o, p) {
|
|
114
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
115
|
+
o.__proto__ = p;
|
|
116
|
+
return o;
|
|
117
|
+
};
|
|
118
|
+
return _set_prototype_of(o, p);
|
|
119
|
+
}
|
|
120
|
+
function _type_of(obj) {
|
|
121
|
+
"@swc/helpers - typeof";
|
|
122
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
123
|
+
}
|
|
124
|
+
var __create = Object.create;
|
|
125
|
+
var __defProp = Object.defineProperty;
|
|
126
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
127
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
128
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
129
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
130
|
+
var __export = function __export(target, all) {
|
|
131
|
+
for(var name in all)__defProp(target, name, {
|
|
132
|
+
get: all[name],
|
|
133
|
+
enumerable: true
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
var __copyProps = function __copyProps(to, from, except, desc) {
|
|
137
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
138
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
139
|
+
try {
|
|
140
|
+
var _loop = function() {
|
|
141
|
+
var key = _step.value;
|
|
142
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
143
|
+
get: function get() {
|
|
144
|
+
return from[key];
|
|
145
|
+
},
|
|
146
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
150
|
+
} catch (err) {
|
|
151
|
+
_didIteratorError = true;
|
|
152
|
+
_iteratorError = err;
|
|
153
|
+
} finally{
|
|
154
|
+
try {
|
|
155
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
156
|
+
_iterator.return();
|
|
157
|
+
}
|
|
158
|
+
} finally{
|
|
159
|
+
if (_didIteratorError) {
|
|
160
|
+
throw _iteratorError;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return to;
|
|
166
|
+
};
|
|
167
|
+
var __toESM = function __toESM(mod, isNodeMode, target) {
|
|
168
|
+
return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
|
|
169
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
170
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
171
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
172
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
173
|
+
value: mod,
|
|
174
|
+
enumerable: true
|
|
175
|
+
}) : target, mod);
|
|
176
|
+
};
|
|
177
|
+
var __toCommonJS = function __toCommonJS(mod) {
|
|
178
|
+
return __copyProps(__defProp({}, "__esModule", {
|
|
179
|
+
value: true
|
|
180
|
+
}), mod);
|
|
181
|
+
};
|
|
182
|
+
// src/Player.tsx
|
|
183
|
+
var Player_exports = {};
|
|
184
|
+
__export(Player_exports, {
|
|
185
|
+
default: function _default() {
|
|
186
|
+
return Player;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
module.exports = __toCommonJS(Player_exports);
|
|
190
|
+
var import_react2 = __toESM(require("react"), 1);
|
|
191
|
+
// src/sdk/hlsAdPlayer.ts
|
|
192
|
+
var import_hls = __toESM(require("hls.js"), 1);
|
|
193
|
+
// src/utils/trackingIngest.ts
|
|
194
|
+
var DEFAULT_TRACKING_INGEST_CONFIG = {
|
|
195
|
+
enabled: true,
|
|
196
|
+
baseUrl: "https://player-analytics-ingest-api-760490581852.us-central1.run.app/api/adstorm/player-tracking"
|
|
197
|
+
};
|
|
198
|
+
var trackingIngestConfig = _object_spread({}, DEFAULT_TRACKING_INGEST_CONFIG);
|
|
199
|
+
// src/utils/vastEnvironmentSignals.ts
|
|
200
|
+
var DEVICE_TYPE_HINT = {
|
|
201
|
+
FEATURE_PHONE: 1,
|
|
202
|
+
SMARTPHONE: 2,
|
|
203
|
+
DESKTOP: 3,
|
|
204
|
+
TABLET: 4,
|
|
205
|
+
CONNECTED_TV: 5,
|
|
206
|
+
GAME_CONSOLE: 6,
|
|
207
|
+
SET_TOP_BOX: 7
|
|
208
|
+
};
|
|
209
|
+
var DEVICE_TYPE_HINT_ALIASES = {
|
|
210
|
+
featurephone: DEVICE_TYPE_HINT.FEATURE_PHONE,
|
|
211
|
+
smartphone: DEVICE_TYPE_HINT.SMARTPHONE,
|
|
212
|
+
mobile: DEVICE_TYPE_HINT.SMARTPHONE,
|
|
213
|
+
phone: DEVICE_TYPE_HINT.SMARTPHONE,
|
|
214
|
+
desktop: DEVICE_TYPE_HINT.DESKTOP,
|
|
215
|
+
pc: DEVICE_TYPE_HINT.DESKTOP,
|
|
216
|
+
tablet: DEVICE_TYPE_HINT.TABLET,
|
|
217
|
+
ctv: DEVICE_TYPE_HINT.CONNECTED_TV,
|
|
218
|
+
tv: DEVICE_TYPE_HINT.CONNECTED_TV,
|
|
219
|
+
connectedtv: DEVICE_TYPE_HINT.CONNECTED_TV,
|
|
220
|
+
smarttv: DEVICE_TYPE_HINT.CONNECTED_TV,
|
|
221
|
+
console: DEVICE_TYPE_HINT.GAME_CONSOLE,
|
|
222
|
+
gameconsole: DEVICE_TYPE_HINT.GAME_CONSOLE,
|
|
223
|
+
stb: DEVICE_TYPE_HINT.SET_TOP_BOX,
|
|
224
|
+
settopbox: DEVICE_TYPE_HINT.SET_TOP_BOX
|
|
225
|
+
};
|
|
226
|
+
var PERSISTENT_ID_COOKIE_MAX_AGE = 60 * 60 * 24 * 365 * 5;
|
|
227
|
+
// src/player/HlsEngine.ts
|
|
228
|
+
var import_hls2 = __toESM(require("hls.js"), 1);
|
|
229
|
+
// src/props.ts
|
|
230
|
+
var noop = function noop() {};
|
|
231
|
+
var defaultProps = {
|
|
232
|
+
playing: false,
|
|
233
|
+
loop: false,
|
|
234
|
+
controls: true,
|
|
235
|
+
volume: 1,
|
|
236
|
+
muted: false,
|
|
237
|
+
playbackRate: 1,
|
|
238
|
+
width: "100%",
|
|
239
|
+
height: "auto",
|
|
240
|
+
style: {},
|
|
241
|
+
progressInterval: 1e3,
|
|
242
|
+
playsInline: false,
|
|
243
|
+
autoplay: false,
|
|
244
|
+
preload: "metadata",
|
|
245
|
+
poster: "",
|
|
246
|
+
className: "",
|
|
247
|
+
wrapperClassName: "",
|
|
248
|
+
wrapperStyle: {},
|
|
249
|
+
allowNativeHls: false,
|
|
250
|
+
lowLatencyMode: false,
|
|
251
|
+
driftToleranceMs: 1e3,
|
|
252
|
+
immediateManifestAds: true,
|
|
253
|
+
debugAdTiming: false,
|
|
254
|
+
showCustomControls: false,
|
|
255
|
+
hideLoadingIndicator: false,
|
|
256
|
+
licenseKey: "",
|
|
257
|
+
isVmap: false,
|
|
258
|
+
vmapUrl: "",
|
|
259
|
+
adFailsafeTimeoutMs: 1e4,
|
|
260
|
+
minSegmentsBeforePlay: 2,
|
|
261
|
+
onStart: noop,
|
|
262
|
+
onPlay: noop,
|
|
263
|
+
onPause: noop,
|
|
264
|
+
onBuffer: noop,
|
|
265
|
+
onBufferEnd: noop,
|
|
266
|
+
onEnded: noop,
|
|
267
|
+
onError: noop,
|
|
268
|
+
onDuration: noop,
|
|
269
|
+
onSeek: noop,
|
|
270
|
+
onProgress: noop,
|
|
271
|
+
onVolumeToggle: noop,
|
|
272
|
+
onFullscreenToggle: noop,
|
|
273
|
+
onControlClick: noop
|
|
274
|
+
};
|
|
275
|
+
// src/utils.ts
|
|
276
|
+
var import_react = require("react");
|
|
277
|
+
var isMediaStream = function isMediaStream(url) {
|
|
278
|
+
return typeof window !== "undefined" && window.MediaStream && _instanceof(url, window.MediaStream);
|
|
279
|
+
};
|
|
280
|
+
var IS_BROWSER = typeof window !== "undefined" && window.document;
|
|
281
|
+
var IS_GLOBAL = typeof globalThis !== "undefined" && globalThis.window && globalThis.window.document;
|
|
282
|
+
var IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
283
|
+
var IS_SAFARI = IS_BROWSER && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
284
|
+
// src/Player.tsx
|
|
285
|
+
var SEEK_ON_PLAY_EXPIRY = 5e3;
|
|
286
|
+
var Player = /*#__PURE__*/ function(_import_react2_Component) {
|
|
287
|
+
_inherits(Player, _import_react2_Component);
|
|
288
|
+
function Player() {
|
|
289
|
+
_class_call_check(this, Player);
|
|
290
|
+
var _this;
|
|
291
|
+
_this = _call_super(this, Player, arguments);
|
|
292
|
+
_this.mounted = false;
|
|
293
|
+
_this.isReady = false;
|
|
294
|
+
_this.isPlaying = false;
|
|
295
|
+
_this.isLoading = true;
|
|
296
|
+
_this.loadOnReady = null;
|
|
297
|
+
_this.startOnPlay = true;
|
|
298
|
+
_this.seekOnPlay = null;
|
|
299
|
+
_this.onDurationCalled = false;
|
|
300
|
+
_this.handlePlayerMount = function(player) {
|
|
301
|
+
if (_this.player) {
|
|
302
|
+
_this.progress();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
_this.player = player;
|
|
306
|
+
_this.player.load(_this.props.src);
|
|
307
|
+
_this.progress();
|
|
308
|
+
};
|
|
309
|
+
_this.getInternalPlayer = function(key) {
|
|
310
|
+
if (!_this.player) return null;
|
|
311
|
+
return _this.player.getInternalPlayer(key);
|
|
312
|
+
};
|
|
313
|
+
_this.progress = function() {
|
|
314
|
+
if (_this.props.src && _this.player && _this.isReady) {
|
|
315
|
+
var playedSeconds = _this.getCurrentTime() || 0;
|
|
316
|
+
var loadedSeconds = _this.getSecondsLoaded();
|
|
317
|
+
var duration = _this.getDuration();
|
|
318
|
+
if (duration) {
|
|
319
|
+
var progress = {
|
|
320
|
+
playedSeconds: playedSeconds,
|
|
321
|
+
played: playedSeconds / duration,
|
|
322
|
+
loaded: 0,
|
|
323
|
+
loadedSeconds: 0
|
|
324
|
+
};
|
|
325
|
+
if (loadedSeconds !== null) {
|
|
326
|
+
progress.loadedSeconds = loadedSeconds;
|
|
327
|
+
progress.loaded = loadedSeconds / duration;
|
|
328
|
+
}
|
|
329
|
+
if (progress.playedSeconds !== _this.prevPlayed || progress.loadedSeconds !== _this.prevLoaded) {
|
|
330
|
+
var _this_props_onProgress, _this_props;
|
|
331
|
+
(_this_props_onProgress = (_this_props = _this.props).onProgress) === null || _this_props_onProgress === void 0 ? void 0 : _this_props_onProgress.call(_this_props, progress);
|
|
332
|
+
}
|
|
333
|
+
_this.prevPlayed = progress.playedSeconds;
|
|
334
|
+
_this.prevLoaded = progress.loadedSeconds;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
_this.progressTimeout = window.setTimeout(_this.progress, _this.props.progressInterval || 1e3);
|
|
338
|
+
};
|
|
339
|
+
_this.handleReady = function() {
|
|
340
|
+
if (!_this.mounted) return;
|
|
341
|
+
_this.isReady = true;
|
|
342
|
+
_this.isLoading = false;
|
|
343
|
+
var _this_props = _this.props, onReady = _this_props.onReady, playing = _this_props.playing, volume = _this_props.volume, muted = _this_props.muted;
|
|
344
|
+
onReady();
|
|
345
|
+
if (!muted && volume !== null) {
|
|
346
|
+
_this.player.setVolume(volume);
|
|
347
|
+
}
|
|
348
|
+
if (_this.loadOnReady) {
|
|
349
|
+
_this.player.load(_this.loadOnReady, true);
|
|
350
|
+
_this.loadOnReady = null;
|
|
351
|
+
} else if (playing) {
|
|
352
|
+
_this.player.play();
|
|
353
|
+
}
|
|
354
|
+
_this.handleDurationCheck();
|
|
355
|
+
};
|
|
356
|
+
_this.handlePlay = function() {
|
|
357
|
+
_this.isPlaying = true;
|
|
358
|
+
_this.isLoading = false;
|
|
359
|
+
var _this_props = _this.props, onStart = _this_props.onStart, onPlay = _this_props.onPlay, playbackRate = _this_props.playbackRate;
|
|
360
|
+
if (_this.startOnPlay) {
|
|
361
|
+
if (_this.player.setPlaybackRate && playbackRate !== 1) {
|
|
362
|
+
_this.player.setPlaybackRate(playbackRate);
|
|
363
|
+
}
|
|
364
|
+
onStart === null || onStart === void 0 ? void 0 : onStart();
|
|
365
|
+
_this.startOnPlay = false;
|
|
366
|
+
}
|
|
367
|
+
onPlay === null || onPlay === void 0 ? void 0 : onPlay();
|
|
368
|
+
if (_this.seekOnPlay) {
|
|
369
|
+
_this.seekTo(_this.seekOnPlay);
|
|
370
|
+
_this.seekOnPlay = null;
|
|
371
|
+
}
|
|
372
|
+
_this.handleDurationCheck();
|
|
373
|
+
};
|
|
374
|
+
_this.handlePause = function(e) {
|
|
375
|
+
_this.isPlaying = false;
|
|
376
|
+
if (!_this.isLoading) {
|
|
377
|
+
var _this_props_onPause, _this_props;
|
|
378
|
+
(_this_props_onPause = (_this_props = _this.props).onPause) === null || _this_props_onPause === void 0 ? void 0 : _this_props_onPause.call(_this_props, e);
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
_this.handleEnded = function() {
|
|
382
|
+
var _this_props = _this.props, activePlayer = _this_props.activePlayer, loop = _this_props.loop, onEnded = _this_props.onEnded;
|
|
383
|
+
if (activePlayer.loopOnEnded && loop) {
|
|
384
|
+
_this.seekTo(0);
|
|
385
|
+
}
|
|
386
|
+
if (!loop) {
|
|
387
|
+
_this.isPlaying = false;
|
|
388
|
+
onEnded === null || onEnded === void 0 ? void 0 : onEnded();
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
_this.handleError = function() {
|
|
392
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
393
|
+
args[_key] = arguments[_key];
|
|
394
|
+
}
|
|
395
|
+
var _this_props_onError, _this_props;
|
|
396
|
+
_this.isLoading = false;
|
|
397
|
+
(_this_props_onError = (_this_props = _this.props).onError) === null || _this_props_onError === void 0 ? void 0 : _this_props_onError.call(_this_props, args[0], args[1], args[2], args[3]);
|
|
398
|
+
};
|
|
399
|
+
_this.handleDurationCheck = function() {
|
|
400
|
+
clearTimeout(_this.durationCheckTimeout);
|
|
401
|
+
var duration = _this.getDuration();
|
|
402
|
+
if (duration) {
|
|
403
|
+
if (!_this.onDurationCalled) {
|
|
404
|
+
var _this_props_onDuration, _this_props;
|
|
405
|
+
(_this_props_onDuration = (_this_props = _this.props).onDuration) === null || _this_props_onDuration === void 0 ? void 0 : _this_props_onDuration.call(_this_props, duration);
|
|
406
|
+
_this.onDurationCalled = true;
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
_this.durationCheckTimeout = window.setTimeout(_this.handleDurationCheck, 100);
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
_this.handleLoaded = function() {
|
|
413
|
+
_this.isLoading = false;
|
|
414
|
+
};
|
|
415
|
+
return _this;
|
|
416
|
+
}
|
|
417
|
+
_create_class(Player, [
|
|
418
|
+
{
|
|
419
|
+
key: "componentDidMount",
|
|
420
|
+
value: function componentDidMount() {
|
|
421
|
+
this.mounted = true;
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
key: "componentWillUnmount",
|
|
426
|
+
value: function componentWillUnmount() {
|
|
427
|
+
clearTimeout(this.progressTimeout);
|
|
428
|
+
clearTimeout(this.durationCheckTimeout);
|
|
429
|
+
this.mounted = false;
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
key: "componentDidUpdate",
|
|
434
|
+
value: function componentDidUpdate(prevProps) {
|
|
435
|
+
var _this = this;
|
|
436
|
+
if (!this.player) return;
|
|
437
|
+
var _this_props = this.props, src = _this_props.src, playing = _this_props.playing, volume = _this_props.volume, muted = _this_props.muted, playbackRate = _this_props.playbackRate, loop = _this_props.loop, activePlayer = _this_props.activePlayer;
|
|
438
|
+
if (prevProps.src !== src) {
|
|
439
|
+
if (this.isLoading && !activePlayer.forceLoad && !isMediaStream(src)) {
|
|
440
|
+
console.warn("StormcloudPlayer: the attempt to load ".concat(src, " is being deferred until the player has loaded"));
|
|
441
|
+
this.loadOnReady = src || null;
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
this.isLoading = true;
|
|
445
|
+
this.startOnPlay = true;
|
|
446
|
+
this.onDurationCalled = false;
|
|
447
|
+
this.player.load(src, this.isReady);
|
|
448
|
+
}
|
|
449
|
+
if (!prevProps.playing && playing && !this.isPlaying) {
|
|
450
|
+
this.player.play();
|
|
451
|
+
}
|
|
452
|
+
if (prevProps.playing && !playing && this.isPlaying) {
|
|
453
|
+
this.player.pause();
|
|
454
|
+
}
|
|
455
|
+
if (prevProps.volume !== volume && volume !== null) {
|
|
456
|
+
this.player.setVolume(volume);
|
|
457
|
+
}
|
|
458
|
+
if (prevProps.muted !== muted) {
|
|
459
|
+
if (muted) {
|
|
460
|
+
this.player.mute();
|
|
461
|
+
} else {
|
|
462
|
+
this.player.unmute();
|
|
463
|
+
if (volume !== null) {
|
|
464
|
+
setTimeout(function() {
|
|
465
|
+
return _this.player.setVolume(volume);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (prevProps.playbackRate !== playbackRate && this.player.setPlaybackRate) {
|
|
471
|
+
this.player.setPlaybackRate(playbackRate);
|
|
472
|
+
}
|
|
473
|
+
if (prevProps.loop !== loop && this.player.setLoop) {
|
|
474
|
+
this.player.setLoop(loop);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
key: "getDuration",
|
|
480
|
+
value: function getDuration() {
|
|
481
|
+
if (!this.isReady) return null;
|
|
482
|
+
return this.player.getDuration();
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
key: "getCurrentTime",
|
|
487
|
+
value: function getCurrentTime() {
|
|
488
|
+
if (!this.isReady) return null;
|
|
489
|
+
return this.player.getCurrentTime();
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
key: "getSecondsLoaded",
|
|
494
|
+
value: function getSecondsLoaded() {
|
|
495
|
+
if (!this.isReady) return null;
|
|
496
|
+
return this.player.getSecondsLoaded();
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
key: "seekTo",
|
|
501
|
+
value: function seekTo(amount, type, keepPlaying) {
|
|
502
|
+
var _this = this;
|
|
503
|
+
if (!this.isReady) {
|
|
504
|
+
if (amount !== 0) {
|
|
505
|
+
this.seekOnPlay = amount;
|
|
506
|
+
setTimeout(function() {
|
|
507
|
+
_this.seekOnPlay = null;
|
|
508
|
+
}, SEEK_ON_PLAY_EXPIRY);
|
|
509
|
+
}
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
var isFraction = !type ? amount > 0 && amount < 1 : type === "fraction";
|
|
513
|
+
if (isFraction) {
|
|
514
|
+
var duration = this.player.getDuration();
|
|
515
|
+
if (!duration) {
|
|
516
|
+
console.warn("StormcloudPlayer: could not seek using fraction \u2013 duration not yet available");
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
this.player.seekTo(duration * amount, keepPlaying);
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
this.player.seekTo(amount, keepPlaying);
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
key: "render",
|
|
527
|
+
value: function render() {
|
|
528
|
+
var Player2 = this.props.activePlayer;
|
|
529
|
+
if (!Player2) {
|
|
530
|
+
return null;
|
|
531
|
+
}
|
|
532
|
+
return import_react2.default.createElement(Player2, _object_spread_props(_object_spread({}, this.props), {
|
|
533
|
+
onMount: this.handlePlayerMount,
|
|
534
|
+
onReady: this.handleReady,
|
|
535
|
+
onPlay: this.handlePlay,
|
|
536
|
+
onPause: this.handlePause,
|
|
537
|
+
onEnded: this.handleEnded,
|
|
538
|
+
onLoaded: this.handleLoaded,
|
|
539
|
+
onError: this.handleError
|
|
540
|
+
}));
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
]);
|
|
544
|
+
return Player;
|
|
545
|
+
}(import_react2.Component);
|
|
546
|
+
Player.displayName = "Player";
|
|
547
|
+
Player.defaultProps = defaultProps;
|
|
548
|
+
//# sourceMappingURL=Player.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\project\\stormcloud-vp\\lib\\Player.cjs"],"names":[],"mappings":"AAAA","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/Player.tsx\nvar Player_exports = {};\n__export(Player_exports, {\n default: () => Player\n});\nmodule.exports = __toCommonJS(Player_exports);\nvar import_react2 = __toESM(require(\"react\"), 1);\n\n// src/sdk/hlsAdPlayer.ts\nvar import_hls = __toESM(require(\"hls.js\"), 1);\n\n// src/utils/trackingIngest.ts\nvar DEFAULT_TRACKING_INGEST_CONFIG = {\n enabled: true,\n baseUrl: \"https://player-analytics-ingest-api-760490581852.us-central1.run.app/api/adstorm/player-tracking\"\n};\nvar trackingIngestConfig = {\n ...DEFAULT_TRACKING_INGEST_CONFIG\n};\n\n// src/utils/vastEnvironmentSignals.ts\nvar DEVICE_TYPE_HINT = {\n FEATURE_PHONE: 1,\n SMARTPHONE: 2,\n DESKTOP: 3,\n TABLET: 4,\n CONNECTED_TV: 5,\n GAME_CONSOLE: 6,\n SET_TOP_BOX: 7\n};\nvar DEVICE_TYPE_HINT_ALIASES = {\n featurephone: DEVICE_TYPE_HINT.FEATURE_PHONE,\n smartphone: DEVICE_TYPE_HINT.SMARTPHONE,\n mobile: DEVICE_TYPE_HINT.SMARTPHONE,\n phone: DEVICE_TYPE_HINT.SMARTPHONE,\n desktop: DEVICE_TYPE_HINT.DESKTOP,\n pc: DEVICE_TYPE_HINT.DESKTOP,\n tablet: DEVICE_TYPE_HINT.TABLET,\n ctv: DEVICE_TYPE_HINT.CONNECTED_TV,\n tv: DEVICE_TYPE_HINT.CONNECTED_TV,\n connectedtv: DEVICE_TYPE_HINT.CONNECTED_TV,\n smarttv: DEVICE_TYPE_HINT.CONNECTED_TV,\n console: DEVICE_TYPE_HINT.GAME_CONSOLE,\n gameconsole: DEVICE_TYPE_HINT.GAME_CONSOLE,\n stb: DEVICE_TYPE_HINT.SET_TOP_BOX,\n settopbox: DEVICE_TYPE_HINT.SET_TOP_BOX\n};\nvar PERSISTENT_ID_COOKIE_MAX_AGE = 60 * 60 * 24 * 365 * 5;\n\n// src/player/HlsEngine.ts\nvar import_hls2 = __toESM(require(\"hls.js\"), 1);\n\n// src/props.ts\nvar noop = () => {\n};\nvar defaultProps = {\n playing: false,\n loop: false,\n controls: true,\n volume: 1,\n muted: false,\n playbackRate: 1,\n width: \"100%\",\n height: \"auto\",\n style: {},\n progressInterval: 1e3,\n playsInline: false,\n autoplay: false,\n preload: \"metadata\",\n poster: \"\",\n className: \"\",\n wrapperClassName: \"\",\n wrapperStyle: {},\n allowNativeHls: false,\n lowLatencyMode: false,\n driftToleranceMs: 1e3,\n immediateManifestAds: true,\n debugAdTiming: false,\n showCustomControls: false,\n hideLoadingIndicator: false,\n licenseKey: \"\",\n isVmap: false,\n vmapUrl: \"\",\n adFailsafeTimeoutMs: 1e4,\n minSegmentsBeforePlay: 2,\n onStart: noop,\n onPlay: noop,\n onPause: noop,\n onBuffer: noop,\n onBufferEnd: noop,\n onEnded: noop,\n onError: noop,\n onDuration: noop,\n onSeek: noop,\n onProgress: noop,\n onVolumeToggle: noop,\n onFullscreenToggle: noop,\n onControlClick: noop\n};\n\n// src/utils.ts\nvar import_react = require(\"react\");\nvar isMediaStream = (url) => {\n return typeof window !== \"undefined\" && window.MediaStream && url instanceof window.MediaStream;\n};\nvar IS_BROWSER = typeof window !== \"undefined\" && window.document;\nvar IS_GLOBAL = typeof globalThis !== \"undefined\" && globalThis.window && globalThis.window.document;\nvar IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar IS_SAFARI = IS_BROWSER && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n\n// src/Player.tsx\nvar SEEK_ON_PLAY_EXPIRY = 5e3;\nvar Player = class extends import_react2.Component {\n constructor() {\n super(...arguments);\n this.mounted = false;\n this.isReady = false;\n this.isPlaying = false;\n this.isLoading = true;\n this.loadOnReady = null;\n this.startOnPlay = true;\n this.seekOnPlay = null;\n this.onDurationCalled = false;\n this.handlePlayerMount = (player) => {\n if (this.player) {\n this.progress();\n return;\n }\n this.player = player;\n this.player.load(this.props.src);\n this.progress();\n };\n this.getInternalPlayer = (key) => {\n if (!this.player) return null;\n return this.player.getInternalPlayer(key);\n };\n this.progress = () => {\n if (this.props.src && this.player && this.isReady) {\n const playedSeconds = this.getCurrentTime() || 0;\n const loadedSeconds = this.getSecondsLoaded();\n const duration = this.getDuration();\n if (duration) {\n const progress = {\n playedSeconds,\n played: playedSeconds / duration,\n loaded: 0,\n loadedSeconds: 0\n };\n if (loadedSeconds !== null) {\n progress.loadedSeconds = loadedSeconds;\n progress.loaded = loadedSeconds / duration;\n }\n if (progress.playedSeconds !== this.prevPlayed || progress.loadedSeconds !== this.prevLoaded) {\n this.props.onProgress?.(progress);\n }\n this.prevPlayed = progress.playedSeconds;\n this.prevLoaded = progress.loadedSeconds;\n }\n }\n this.progressTimeout = window.setTimeout(\n this.progress,\n this.props.progressInterval || 1e3\n );\n };\n this.handleReady = () => {\n if (!this.mounted) return;\n this.isReady = true;\n this.isLoading = false;\n const { onReady, playing, volume, muted } = this.props;\n onReady();\n if (!muted && volume !== null) {\n this.player.setVolume(volume);\n }\n if (this.loadOnReady) {\n this.player.load(this.loadOnReady, true);\n this.loadOnReady = null;\n } else if (playing) {\n this.player.play();\n }\n this.handleDurationCheck();\n };\n this.handlePlay = () => {\n this.isPlaying = true;\n this.isLoading = false;\n const { onStart, onPlay, playbackRate } = this.props;\n if (this.startOnPlay) {\n if (this.player.setPlaybackRate && playbackRate !== 1) {\n this.player.setPlaybackRate(playbackRate);\n }\n onStart?.();\n this.startOnPlay = false;\n }\n onPlay?.();\n if (this.seekOnPlay) {\n this.seekTo(this.seekOnPlay);\n this.seekOnPlay = null;\n }\n this.handleDurationCheck();\n };\n this.handlePause = (e) => {\n this.isPlaying = false;\n if (!this.isLoading) {\n this.props.onPause?.(e);\n }\n };\n this.handleEnded = () => {\n const { activePlayer, loop, onEnded } = this.props;\n if (activePlayer.loopOnEnded && loop) {\n this.seekTo(0);\n }\n if (!loop) {\n this.isPlaying = false;\n onEnded?.();\n }\n };\n this.handleError = (...args) => {\n this.isLoading = false;\n this.props.onError?.(args[0], args[1], args[2], args[3]);\n };\n this.handleDurationCheck = () => {\n clearTimeout(this.durationCheckTimeout);\n const duration = this.getDuration();\n if (duration) {\n if (!this.onDurationCalled) {\n this.props.onDuration?.(duration);\n this.onDurationCalled = true;\n }\n } else {\n this.durationCheckTimeout = window.setTimeout(\n this.handleDurationCheck,\n 100\n );\n }\n };\n this.handleLoaded = () => {\n this.isLoading = false;\n };\n }\n componentDidMount() {\n this.mounted = true;\n }\n componentWillUnmount() {\n clearTimeout(this.progressTimeout);\n clearTimeout(this.durationCheckTimeout);\n this.mounted = false;\n }\n componentDidUpdate(prevProps) {\n if (!this.player) return;\n const { src, playing, volume, muted, playbackRate, loop, activePlayer } = this.props;\n if (prevProps.src !== src) {\n if (this.isLoading && !activePlayer.forceLoad && !isMediaStream(src)) {\n console.warn(\n `StormcloudPlayer: the attempt to load ${src} is being deferred until the player has loaded`\n );\n this.loadOnReady = src || null;\n return;\n }\n this.isLoading = true;\n this.startOnPlay = true;\n this.onDurationCalled = false;\n this.player.load(src, this.isReady);\n }\n if (!prevProps.playing && playing && !this.isPlaying) {\n this.player.play();\n }\n if (prevProps.playing && !playing && this.isPlaying) {\n this.player.pause();\n }\n if (prevProps.volume !== volume && volume !== null) {\n this.player.setVolume(volume);\n }\n if (prevProps.muted !== muted) {\n if (muted) {\n this.player.mute();\n } else {\n this.player.unmute();\n if (volume !== null) {\n setTimeout(() => this.player.setVolume(volume));\n }\n }\n }\n if (prevProps.playbackRate !== playbackRate && this.player.setPlaybackRate) {\n this.player.setPlaybackRate(playbackRate);\n }\n if (prevProps.loop !== loop && this.player.setLoop) {\n this.player.setLoop(loop);\n }\n }\n getDuration() {\n if (!this.isReady) return null;\n return this.player.getDuration();\n }\n getCurrentTime() {\n if (!this.isReady) return null;\n return this.player.getCurrentTime();\n }\n getSecondsLoaded() {\n if (!this.isReady) return null;\n return this.player.getSecondsLoaded();\n }\n seekTo(amount, type, keepPlaying) {\n if (!this.isReady) {\n if (amount !== 0) {\n this.seekOnPlay = amount;\n setTimeout(() => {\n this.seekOnPlay = null;\n }, SEEK_ON_PLAY_EXPIRY);\n }\n return;\n }\n const isFraction = !type ? amount > 0 && amount < 1 : type === \"fraction\";\n if (isFraction) {\n const duration = this.player.getDuration();\n if (!duration) {\n console.warn(\n \"StormcloudPlayer: could not seek using fraction \\u2013 duration not yet available\"\n );\n return;\n }\n this.player.seekTo(duration * amount, keepPlaying);\n return;\n }\n this.player.seekTo(amount, keepPlaying);\n }\n render() {\n const Player2 = this.props.activePlayer;\n if (!Player2) {\n return null;\n }\n return import_react2.default.createElement(Player2, {\n ...this.props,\n onMount: this.handlePlayerMount,\n onReady: this.handleReady,\n onPlay: this.handlePlay,\n onPause: this.handlePause,\n onEnded: this.handleEnded,\n onLoaded: this.handleLoaded,\n onError: this.handleError\n });\n }\n};\nPlayer.displayName = \"Player\";\nPlayer.defaultProps = defaultProps;\n"]}
|