veplayer-mp-douyin
Advanced tools
Comparing version 0.0.9-alpha.0 to 0.0.11
{ | ||
"name": "veplayer-mp-douyin", | ||
"version": "0.0.9-alpha.0", | ||
"version": "0.0.11", | ||
"license": "MIT", | ||
@@ -16,9 +16,8 @@ "miniprogramType": "tt-npm", | ||
"scripts": { | ||
"release": "npm version patch && npm publish --tag latest --registry=https://registry.npmjs.org", | ||
"release-alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha --registry=https://registry.npmjs.org" | ||
"release": "npm version patch && npm publish --tag latest --registry=https://registry.npmjs.org" | ||
}, | ||
"main": "dist/index", | ||
"main": "src/index.js", | ||
"exports": { | ||
"components": { | ||
"veplayer": "index" | ||
"veplayer": "dist/index" | ||
} | ||
@@ -25,0 +24,0 @@ }, |
@@ -29,2 +29,3 @@ # Veplayer小程序播放器 | ||
⚠️注意由于抖音开发者工具(截止4.0.7-1版本)npm功能的缺陷,目前引用npm功能,需要手动将`node_modules`的`veplayer-mp-douyin`复制到`miniprogram_npm`内才可正常引入。 | ||
```json | ||
@@ -106,22 +107,23 @@ { | ||
let player = null | ||
// 异步获取 | ||
// 异步获取组件内video的VideoContext | ||
const component = this.selectComponent("#videoContainer", (component) => { | ||
player = component.getContext() | ||
// 原生接口 | ||
player.play() | ||
player.pause() | ||
player.stop() | ||
player.seek(10) | ||
player.requestFullScreen() | ||
player.exitFullScreen() | ||
player.setWaterMark({ color: "#FFFF11" }) | ||
player.setMediaVolume({ value: 1}) | ||
player.getMediaVolume(options) | ||
player.playbackRate(1) | ||
player.requestFullScreen({ direction: 90 }) | ||
player.exitFullScreen() | ||
}); | ||
// 同步获取,需要保证是在page或者component的ready事件之后才能正常调用 | ||
// 同步获取组件内video的VideoContext,需要保证是在page或者component的ready事件之后才能正常调用 | ||
// player = this.selectComponent("#videoContainer").getContext(); | ||
// 原生接口 | ||
player.play() | ||
player.pause() | ||
player.stop() | ||
player.seek(10) | ||
player.requestFullScreen() | ||
player.exitFullScreen() | ||
player.setWaterMark({ color: "#FFFF11" }) | ||
player.setMediaVolume({ value: 1}) | ||
player.getMediaVolume(options) | ||
player.playbackRate(1) | ||
player.requestFullScreen({ direction: 90 }) | ||
player.exitFullScreen() | ||
// player.play() | ||
// ... | ||
``` | ||
@@ -128,0 +130,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69920
178