


wx.chooseLocation(OBJECT)
Open the map and select the location
OBJECT parameter description:
[tr] Required description of parameter type[/tr]
success | Function | is the | interface call Successful callback function, please refer to the return parameter description for details of the return content. |
cancel | Function | No | Called when user cancels |
Function | No | Callback function for failed interface call | |
Function | No | The callback function at the end of the interface call (will be executed if the call is successful or failed) |
success return parameter description: [tr]Parameter description[/tr]
Location name | |
Detailed address | |
Latitude, floating point number, range is -90~90, negative number indicates south latitude | |
Longitude, floating point number, range is -180~180, negative number represents west longitude |
##wx.getImageInfo (OBJECT)
Get picture information
OBJECT parameter description:
[tr]Parameter type required description[/tr]
String | is the path of the | picture, which can be a relative path, a temporary file path, or a storage file Path | |
Function | No | Callback function for successful interface call | |
Function | No | Callback function for failed interface call | |
Function | No | The callback function at the end of the interface call (will be executed if the call is successful or failed) |
[tr]Parameter type description[/tr]
Number | Picture width, unit px | |
Number | Picture height unit px |
wx.getImageInfo({ src: 'images/a.jpg', success: function(res) { console.log(res.width) console.log(res.height) } }) wx.chooseImage({ success: function(res) { wx.getImageInfo({ src: res.tempFilePaths[0], success: function(res) { console.log(res.width) console.log(res.height) } }) } })
wx.createAudioContext(audioId)
Create and return the audio context audioContext object
audioContext
audioContext is bound to an audio component through audioId, and an audio component can be operated through it.
Method list of audioContext object:
[tr]Method parameter description[/tr]
None | Play | |
None | Pause | ## seek |
Jump to the specified position, unit s |
<span class="hljs-tag" style="box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-size: inherit; color: rgb(200, 40, 41);"></span>
<span class="hljs-tag" style="box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-size: inherit; color: rgb(200, 40, 41);">播放</span>
<span class="hljs-tag" style="box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-size: inherit; color: rgb(200, 40, 41);">暂停</span>
<span class="hljs-tag" style="box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-size: inherit; color: rgb(200, 40, 41);">设置当前播放时间为14秒</span>
<span class="hljs-tag" style="box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; font-size: inherit; color: rgb(200, 40, 41);">回到开头</span>
audio.jsPage({ onReady: function(e) { // 使用 wx.createAudioContext 获取 audio 上下文 context this.audioCtx = wx.createAudioContext('myAudio') }, data: { src: 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46', }, audioPlay: function() { this.audioCtx.play() }, audioPause: function() { this.audioCtx.pause() }, audio14: function() { this.audioCtx.seek(14) }, audioStart: function() { this.audioCtx.seek(0) } })
##wx.createVideoContext(videoId)
Create and return the video context videoContext object
videoContext
##videoContext is bound to a video component through videoId. Through it you can operate a video component.
Method list of videoContext object:
[tr]Method parameter description[/tr]
play
pause | None | |
## seek | position | |
sendDanmu | danmu | |
Sample code: |
More WeChat mini programs: Geolocation API, For articles related to image information API, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.