Micro-build low-code development of video playback applets

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
insert image description here

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
insert image description here
Select the data source for our video playback
insert image description here
Click the navigation menu to generate a menu with one click
insert image description here
insert image description here
Click Publish, publish it as a preview version, and upload our video on the enterprise workbench
insert image description here
After publishing, upload our video on the enterprise workbench
insert image description here
insert image description here

3 Build a small program

Create a custom application to build our applet
insert image description here
insert image description here
Add a data list component to the opened homepage, select our video playback data source
insert image description here
Modify the component, we use the card list template
insert image description here
insert image description here
Create a new page for playing videos
insert image description here
Create a new URL parameter, we use
insert image description here
insert image description here
Add a video playback component to receive the incoming URL from the list page
insert image description here
Bind parameters to the video resource, bind our URL parameters
insert image description here
Go back to the home page, select the normal container, we add a click event
insert image description here
Select the javascript code
insert image description here
to choose to add a new method, method name Enter bofang
insert image description here
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
insert image description here
insert image description here

final effect

insert image description here

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.

Guess you like

Origin blog.csdn.net/u012877217/article/details/129913300