Chat materials support Mini Program to open how to use
This article introduces the relevant knowledge of "chat materials support how to use Mini Program". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Function introduction
Wechat chat materials (pictures, videos and webview) open the way to increase the use of Mini Program to open the portal. Users can use Mini Program to process pictures, videos and webview in the chat. For example, use Mini Program to filter pictures, make video clips, or save webview to notes.
When a user opens material in Wechat chat, if Mini Program is configured to support opening and approval of this type of material, and the user has used the Mini Program, an entrance opened by Mini Program will appear when opening this type of material.
instructions
Developers need to declare in the Mini Program global configuration (app.json) that open file types are supported, and only one way to handle a file type can be declared.
{
"supportedMaterials": [
{
"materialType": "text/html"
"name": "Open with ${nickname}"
"desc": "description"
"path": "pages/index/"
}
{
"materialType": "video/*"
"name": "play with ${nickname}"
"desc": "description"
"path": "pages/index/"
}
{
"materialType": "video/mp4"
"name": "play with ${nickname}"
"desc": "description"
"path": "pages/index/"
}
]
}
This is the end of the content of "chat material supports how to use Mini Program". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!