Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

veplayer-mp-douyin

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

veplayer-mp-douyin - npm Package Compare versions

Comparing version 1.0.3-alpha.2 to 1.0.3-alpha.3

4

dist/behaviors/videoBehavior.js

@@ -45,2 +45,6 @@ "use strict";

},
showCenterPlayBtn: {
type: Boolean,
value: true,
},
preRollUnitId: String,

@@ -47,0 +51,0 @@ postRollUnitId: String,

100

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable max-len */
/* eslint-disable @typescript-eslint/comma-dangle */
/* eslint-disable object-shorthand */

@@ -29,3 +28,3 @@ /* eslint-disable @typescript-eslint/naming-convention */

this.setData({
customControls: newVal === 'native' ? false : newVal
customControls: newVal === 'native' ? false : newVal,
});

@@ -36,3 +35,3 @@ }

}
}
},
},

@@ -43,19 +42,19 @@ // tag的类型,用来继承其他标签

type: String,
value: 'video'
value: 'video',
},
mode: {
type: String,
value: "portrait" /* PlayerModes.PORTRAIT */
value: "portrait" /* PlayerModes.PORTRAIT */,
},
componentId: {
type: String,
value: ''
value: '',
},
playAuthToken: {
type: String,
value: ''
value: '',
},
playDomain: {
type: String,
value: 'https://vod.volcengineapi.com' // 默认火山引擎点播openapi域名
value: 'https://vod.volcengineapi.com', // 默认火山引擎点播openapi域名
},

@@ -68,8 +67,8 @@ definitionUrls: {

this.setData({ definitionUrls: newVal });
}
},
},
autoBlurTime: {
type: Number,
value: 10000
}
value: 10000,
},
},

@@ -108,3 +107,3 @@ data: {

// 可否可使用video以外的其他tagType
canUseOtherType: true
canUseOtherType: true,
},

@@ -130,11 +129,12 @@ observers: {

this.setData({
error: null
error: null,
isLoadingData: false,
});
this.updateCollector({
src: currentSrc || src
src: currentSrc || src,
});
},
'src,definitionList,playAuthToken,playDomain': function () {
const { src, definitionList, playAuthToken, playDomain } = this.data;
// console.log('>>>>observers', src, definitionList, playDomain)
const { src, definitionList, playAuthToken, playDomain, isLoadingData } = this.data;
console.log('>>>>observers', `isLoadingData:${isLoadingData} playDomain:${playDomain} playAuthToken:${playAuthToken} src:${src}`);
this.triggerCollector('break');

@@ -146,3 +146,3 @@ this.updateCollector(this.data);

this.setData({
definitionList: definitionList
definitionList: definitionList,
});

@@ -152,3 +152,3 @@ }

currentSrc: src,
isLoadingData: false
isLoadingData: false,
});

@@ -159,3 +159,3 @@ }

this.setData({
isLoadingData: true
isLoadingData: true,
});

@@ -171,3 +171,3 @@ (0, xgplayer_service_miniprogram_1.url)(playAuthToken, playDomain || undefined)

url: item.MainPlayUrl,
quality: item.Bitrate
quality: item.Bitrate,
};

@@ -178,3 +178,3 @@ return def;

isLoadingData: false,
currentSrc: defaultDef.MainPlayUrl
currentSrc: defaultDef.MainPlayUrl,
});

@@ -184,3 +184,3 @@ if (qualityList.length > 0) {

playbackDefinition: defaultDef.Bitrate,
playbackDefinitionList: qualityList
playbackDefinitionList: qualityList,
});

@@ -192,3 +192,3 @@ }

isLoadingData: false,
error: new error_1.XGError(error_1.ErrorCategory.SERVICE, index_1.ErrorCodes.SERVICE_PLAYINFOLIST_EMPTY, 'Service Error')
error: new error_1.XGError(error_1.ErrorCategory.SERVICE, index_1.ErrorCodes.SERVICE_PLAYINFOLIST_EMPTY, 'Service Error'),
});

@@ -200,3 +200,3 @@ }

isLoadingData: false,
error: new error_1.XGError(error_1.ErrorCategory.SERVICE, index_1.ErrorCodes.SERVICE_UNKNOWN, 'Service Error')
error: new error_1.XGError(error_1.ErrorCategory.SERVICE, index_1.ErrorCodes.SERVICE_UNKNOWN, 'Service Error'),
});

@@ -230,3 +230,3 @@ });

videoId: _videoId,
customControls: controls !== 'native' ? controls : false
customControls: controls !== 'native' ? controls : false,
});

@@ -237,3 +237,3 @@ const videoCtx = tt.createVideoContext(_videoId, this);

// use Set to filter duplicate string item in Array
...new Set([isFullScreen ? ' xg-video-fullscreen' : '', ...propsClassNames])
...new Set([isFullScreen ? ' xg-video-fullscreen' : '', ...propsClassNames]),
].filter((item) => !!item);

@@ -246,7 +246,7 @@ // const showCtrlOverlay = (loadedMeta && toggleCtrlOverLayer) || ended

self.setData({
seeking: true
seeking: true,
});
}
return Reflect.get(target, prop, receiver);
}
},
});

@@ -261,3 +261,3 @@ if (Object.isExtensible(videoProxyCtx)) {

classNames: classNames.join(' '),
canUseOtherType: canUse
canUseOtherType: canUse,
});

@@ -296,5 +296,5 @@ },

this.setData({
error: error
error: error,
});
}
},
},

@@ -322,3 +322,3 @@ methods: {

this.setData({
isFocus: true
isFocus: true,
});

@@ -331,3 +331,3 @@ },

this.setData({
isFocus: false
isFocus: false,
});

@@ -367,5 +367,5 @@ }

let { errMsg } = e.detail;
const { currentSrc, playAuthToken } = this.properties;
const { isLoadingData } = this.data;
if (playAuthToken && !currentSrc && isLoadingData) {
const { isLoadingData, currentSrc } = this.data;
if (!currentSrc && isLoadingData) {
console.warn('The is not aviliable [src] or [playAutoToken] for playback, please check~~');
return;

@@ -384,3 +384,3 @@ }

this.setData({
error: new error_1.XGError(error_1.ErrorCategory.MEDIA, errCode, errMsg)
error: new error_1.XGError(error_1.ErrorCategory.MEDIA, errCode, errMsg),
});

@@ -394,7 +394,7 @@ },

loadedMeta: true,
duration: duration
duration: duration,
});
if (definitionChangePoint) {
this.setData({
definitionChangePoint: undefined
definitionChangePoint: undefined,
});

@@ -411,3 +411,3 @@ this.media.seek(definitionChangePoint);

ended: false,
error: null
error: null,
};

@@ -427,3 +427,3 @@ if (!firstPlay) {

this.setData({
paused: true
paused: true,
});

@@ -439,3 +439,3 @@ this._emitEvt(index_1.MediaEvents.PAUSE, e);

duration: duration || 0,
playPercent: duration > 0 ? Math.floor((currentTime / duration) * 100) : 0
playPercent: duration > 0 ? Math.floor((currentTime / duration) * 100) : 0,
};

@@ -451,3 +451,3 @@ if (seeking) {

this.setData({
seeking: false
seeking: false,
});

@@ -461,3 +461,3 @@ // 挪到状态变化内进行事件监听

ended: true,
paused: true
paused: true,
};

@@ -474,3 +474,3 @@ if (seeking) {

buffered: buffered,
bufferedTime: (buffered * this.data.duration) / 100
bufferedTime: (buffered * this.data.duration) / 100,
});

@@ -482,3 +482,3 @@ this._emitEvt(index_1.MediaEvents.PROGRESS, e);

this.setData({
isFullScreen: fullScreen
isFullScreen: fullScreen,
});

@@ -508,3 +508,3 @@ this._emitEvt(index_1.MediaEvents.FULLSCREENCHANGE, e);

this.setData({
loading: !loadedMeta || (seeking && !paused)
loading: !loadedMeta || (seeking && !paused),
});

@@ -515,3 +515,3 @@ },

this.setData({
showPoster: poster && !error && !autoplay && !firstPlay
showPoster: poster && !error && !autoplay && !firstPlay,
});

@@ -521,4 +521,4 @@ },

//
}
}
},
},
});
{
"name": "veplayer-mp-douyin",
"version": "1.0.3-alpha.2",
"version": "1.0.3-alpha.3",
"license": "MIT",

@@ -5,0 +5,0 @@ "miniprogramType": "tt-npm",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc