xgplayer 3.1.0-alpha.3 → 3.1.0-alpha.4
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/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/player.js +1 -1
- package/es/plugin/pluginsManager.js +2 -2
- package/package.json +1 -1
package/es/player.js
CHANGED
|
@@ -197,6 +197,7 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
|
|
|
197
197
|
console.error(new Error("can't find the dom which id is ".concat(_this.config.id, " or this.config.el does not exist")));
|
|
198
198
|
return _possibleConstructorReturn(_this);
|
|
199
199
|
}
|
|
200
|
+
pluginsManager.init(_assertThisInitialized(_this));
|
|
200
201
|
var _this$config2 = _this.config, _this$config2$definit = _this$config2.definition, definition = _this$config2$definit === void 0 ? {} : _this$config2$definit, url = _this$config2.url;
|
|
201
202
|
if (!url && definition.list && definition.list.length > 0) {
|
|
202
203
|
var defaultDefinitionObj = definition.list.find(function(e) {
|
|
@@ -256,7 +257,6 @@ var Player = /* @__PURE__ */ function(_MediaProxy) {
|
|
|
256
257
|
ret.destroy();
|
|
257
258
|
}
|
|
258
259
|
this.root.setAttribute(PLATER_ID, this.playerId);
|
|
259
|
-
pluginsManager.init(this);
|
|
260
260
|
this._initBaseDoms();
|
|
261
261
|
var XgVideoProxy = this.constructor.XgVideoProxy;
|
|
262
262
|
if (XgVideoProxy && this.mediaConfig.mediaType === XgVideoProxy.mediaType) {
|
|
@@ -5,10 +5,10 @@ var pluginsManager = {
|
|
|
5
5
|
init: function init(player) {
|
|
6
6
|
var cgid = player._pluginInfoId;
|
|
7
7
|
if (!cgid) {
|
|
8
|
-
cgid =
|
|
8
|
+
cgid = util.generateSessionId();
|
|
9
9
|
player._pluginInfoId = cgid;
|
|
10
10
|
}
|
|
11
|
-
!player.config.closeResizeObserver && addObserver(player.root, function() {
|
|
11
|
+
!player.config.closeResizeObserver && player.root && addObserver(player.root, function() {
|
|
12
12
|
player.resize();
|
|
13
13
|
});
|
|
14
14
|
if (Object.keys(this.pluginGroup).length === 0) {
|