On the use of promise

    createVideoContext () {
      var p = new Promise((resolve, reject) => {
        var myVideo = wx.createVideoContext("myVideo")
        resolve(myVideo)
      })
      return p
    }
wx.createVideoContext("myVideo")    
May.27,2022

`createVideoContext () {
var myVideo = Promise.resolve (wx.createVideoContext ('myVideo'))
return myVideo
} `

how about this?


wepy is good. Mini Program api comes with its own package. Wepy is written as await wepy.createVideoContext ('myVideo')

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3fd3e-34875.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3fd3e-34875.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?