In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how WeChat Mini Programs videoContext is used, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this article on how to use WeChat Mini Programs videoContext. Let's take a look at it.
Wx.createVideoContext (videoId)
Create and return a video context videoContext object
VideoContext
VideoContext is bound to a video component through videoId, through which you can manipulate a video component.
List of methods for the videoContext object:
The method parameters indicate that the minimum version play has no playback pause, no pause seekposition jumps to the specified location, and the unit ssendDanmudanmu sends on-screen comments. Danmu contains two attributes: text and color. PlaybackRaterate sets double speed playback. The supported magnification is 0.5/0.8/1.0/1.25/1.51.4.0requestFullScreen without entering full screen 1.4.0exitFullScreen or exiting full screen 1.4.0.
Sample code:
Send on-screen comment function getRandomColor () {let rgb = [] for (let I = 0; I < 3 + + I) {let color = Math.floor (Math.random () * 256B) .toString (16) color = color.length = = 1?'0' + color: color rgb.push (color)} return'#'+ rgb.join ('')} Page ({onReady: function (res) {this.videoContext = wx.createVideoContext ('myVideo')}, inputValue:', bindInputBlur: function (e) {this.inputValue = e.detail.value} BindSendDanmu: function () {this.videoContext.sendDanmu ({text: this.inputValue, color: getRandomColor ())}) this is the end of the article on "how to use WeChat Mini Programs's videoContext". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use WeChat Mini Programs videoContext". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.