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.9 to 1.0.3

12

dist/enums/errorCode.js

@@ -12,5 +12,5 @@ "use strict";

ErrorCodes[ErrorCodes["Collector_NOT_CONFIGURED"] = 9] = "Collector_NOT_CONFIGURED";
////////////////////////////////////////////////////////////////////////
//////////////////////// 1000 -> 1999 = MEDIA //////////////////////////
////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////
// ////////////////////// 1000 -> 1999 = MEDIA //////////////////////////
// //////////////////////////////////////////////////////////////////////
/**

@@ -42,7 +42,7 @@ * https://developers.weixin.qq.com/minigame/dev/api/media/video/Video.onError.html

// MEDIA_ELEMENT_ERROR:
////////////////////////////////////////////////////////////////////////
//////////////////////// 1000 -> 1999 = SERVICE ////////////////////////
////////////////////////////////////////////////////////////////////////
// //////////////////////////////////////////////////////////////////////
// ////////////////////// 1000 -> 1999 = SERVICE ////////////////////////
// //////////////////////////////////////////////////////////////////////
ErrorCodes[ErrorCodes["SERVICE_UNKNOWN"] = 2000] = "SERVICE_UNKNOWN";
ErrorCodes[ErrorCodes["SERVICE_PLAYINFOLIST_EMPTY"] = 2001] = "SERVICE_PLAYINFOLIST_EMPTY";
})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));

@@ -14,3 +14,3 @@ "use strict";

type: String,
value: 'hide'
value: 'hide',
},

@@ -22,4 +22,4 @@ /**

type: Object,
value: undefined
}
value: undefined,
},
},

@@ -33,3 +33,3 @@ /**

// console.log('component loading ready:', this.data);
}
},
},

@@ -41,6 +41,5 @@ /**

onClickRefresh() {
// TODO
// console.log('refresh player');
}
}
this.triggerEvent('retry');
},
},
});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable object-shorthand */
const videoEventsBehavior_1 = require("../../behaviors/videoEventsBehavior");

@@ -10,5 +9,9 @@ const index_1 = require("../../tool/index");

properties: {
pluginName: {
type: String,
value: 'progress',
},
blockSize: {
type: Number,
value: 10,
value: 12,
},

@@ -23,9 +26,13 @@ blockColor: {

},
borderRadius: {
type: Number,
value: 3,
},
backgroundColor: {
type: String,
value: 'rgba(255, 255, 255, 0.1)',
value: 'rgba(255, 255, 255, 0.2)',
},
cacheColor: {
type: String,
value: 'rgba(255, 255, 255, 0.5)',
value: 'rgba(255, 255, 255, 0.38)',
},

@@ -50,13 +57,12 @@ playedColor: {

},
observers: {},
lifetimes: {
// 生命周期函数,可以为函数,或一个在methods段中定义的方法名
// created: function() {},
// attached: function () { },
ready: function () {
// console.log('[progress]>>>ready', this.properties.videoId)
// created() {},
// attached () { },
ready() {
// console.log('!!!![progress]>>>ready', this.properties.videoId)
this.addMediaEvents(index_1.default);
},
// moved: function () { },
detached: function () {
// moved () { },
detached() {
// console.log('[progress]>>>detached')

@@ -68,13 +74,9 @@ this.removeMediaEvents(index_1.default);

// 组件所在页面的生命周期函数
// show: function () { },
// hide: function () { },
// resize: function () { },
},
methods: {
onClick: function () {
// console.log('>>>>Progress', e)
onClick() {
// 空方法,用于阻止进度条的点击事件冒泡
},
_onTimeupdate: function (data) {
const { currentTime, playPercent } = data.data;
_onTimeupdate(data) {
const { currentTime, duration, playPercent } = data.data;
if (!this.data.isActive && !this.data.isSeeking) {

@@ -84,15 +86,21 @@ this.setData({

blockStyle: `left:${playPercent}%;`,
currentTime: currentTime,
currentTime,
currentTimeText: (0, index_2.format)(currentTime),
});
}
if (this.data.duration !== duration) {
this.setData({
duration,
durationText: (0, index_2.format)(duration),
});
}
},
_onProgress: function (data) {
_onProgress(data) {
const { buffered } = data.data;
// console.log('[progress]>_onProgress', buffered, bufferedTime)
this.setData({
buffered: buffered,
buffered,
});
},
_onLoadedmetadata: function (data) {
_onLoadedmetadata(data) {
const { duration } = data.data;

@@ -105,3 +113,3 @@ // console.log('[progress]>_onLoadedmetadata', duration, format(duration))

},
_onSeekcomplete: function () {
_onSeekcomplete() {
// // console.log('[progress]_onSeekComplete')

@@ -112,3 +120,3 @@ this.setData({

},
onProgressChange: function (e) {
onProgressChange(e) {
const { value } = e.detail;

@@ -119,3 +127,3 @@ const { duration } = this.data;

}
const seekTime = value * this.data.duration / 100;
const seekTime = value * duration / 100;
// console.log('>>>onChange', e.detail, value, this.data.duration, seekTime)

@@ -128,3 +136,3 @@ this.setData({

},
onProgressChanging: function (e) {
onProgressChanging(e) {
const { value } = e.detail;

@@ -131,0 +139,0 @@ const { duration } = this.data;

@@ -17,3 +17,3 @@ "use strict";

type: Boolean,
value: false
value: false,
},

@@ -25,3 +25,3 @@ /**

type: String,
value: 'small'
value: 'small',
},

@@ -34,9 +34,9 @@ /**

value: true,
observer(newVal, oldVal, _changedPath) {
observer(newVal, _changedPath) {
const data = {
className: newVal ? 'xg-paused' : 'xg-playing'
className: newVal ? 'xg-paused' : 'xg-playing',
};
this.setData(data);
}
}
},
},
},

@@ -50,3 +50,3 @@ /**

className: 'xg-icon-play',
sizeClassName: 'xg-icon-middle'
sizeClassName: 'xg-icon-middle',
},

@@ -58,3 +58,3 @@ lifetimes: {

width: '',
height: ''
height: '',
};

@@ -64,3 +64,3 @@ switch (size) {

this.setData({
sizeClassName: 'xg-icon-large'
sizeClassName: 'xg-icon-large',
});

@@ -70,8 +70,10 @@ break;

this.setData({
sizeClassName: 'xg-icon-small'
sizeClassName: 'xg-icon-small',
});
break;
default:
//
}
this.setData({
style: (0, index_1.styleToText)(style)
style: (0, index_1.styleToText)(style),
});

@@ -82,3 +84,3 @@ this.addMediaEvents(index_2.default);

this.removeMediaEvents(index_2.default);
}
},
},

@@ -99,4 +101,4 @@ /**

}
}
}
},
},
});

@@ -9,3 +9,3 @@ "use strict";

addGlobalClass: true,
styleIsolation: 'apply-shared'
styleIsolation: 'apply-shared',
}, options.options || {});

@@ -12,0 +12,0 @@ Component(options);

@@ -7,5 +7,3 @@ "use strict";

Object.keys(style).forEach((key) => {
const bbqKey = key.replace(/[A-Z]/g, (val) => {
return '-' + val.toLowerCase();
});
const bbqKey = key.replace(/[A-Z]/g, (val) => `-${val.toLowerCase()}`);
cssText += `${bbqKey}:${style[key]};`;

@@ -12,0 +10,0 @@ });

{
"name": "veplayer-mp-douyin",
"version": "1.0.3-alpha.9",
"version": "1.0.3",
"license": "MIT",

@@ -31,6 +31,3 @@ "miniprogramType": "tt-npm",

"xgplayer-service-miniprogram": "^0.4.0"
},
"devDependencies": {
"fs-extra": "^11.1.1"
}
}

@@ -54,3 +54,3 @@ const path = require('path');

} catch (err) {
console.warn('复制veplayer-mp-douyin失败,请手动复制node_modules/veplayer-mp-douyin到根目录下的tttcomponents');
console.warn('复制veplayer-mp-douyin失败,请手动复制node_modules/veplayer-mp-douyin到根目录下的ttcomponents');
}

Sorry, the diff of this file is not supported yet

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