I have some videos that I want to share with my users, how can I achieve this in Weibo?
1 Create a data source
Anyone who wants to share resources on the Internet must first create a data source. The videos we have accumulated also need to be transferred to the data source of WeTake first, and called in the applet. The fields of the data source are as follows
2 Create model application
After the data source is available, we need to create a model application to manage our videos. Click New Model Application
Select the data source for our video playback
Click the navigation menu to generate a menu with one click
Click Publish, publish it as a preview version, and upload our video on the enterprise workbench
After publishing, upload our video on the enterprise workbench
3 Build a small program
Create a custom application to build our applet
Add a data list component to the opened homepage, select our video playback data source
Modify the component, we use the card list template
Create a new page for playing videos
Create a new URL parameter, we use
Add a video playback component to receive the incoming URL from the list page
Bind parameters to the video resource, bind our URL parameters
Go back to the home page, select the normal container, we add a click event
Select the javascript code
to choose to add a new method, method name Enter bofang
and enter the following code
export default function ({
event, data }) {
console.log(data)
app.cloud.getTempFileURL(data.target).then(url => {
app.navigateTo({
pageId: 'u_shi_pin_bo_fang', // 页面 Id
params: {
url: url },
});
})
}
Then set the input parameters and pass in the video content field of the data field
final effect
Summarize
In this article, we take everyone to build a video playback applet with low-code tools. It is very convenient to develop with low-code. You only need to write a small amount of code to realize the function. If you also want to make applets at low cost, pay attention me.