当前位置:网站首页>Dplayer development barrage background

Dplayer development barrage background

2022-06-21 14:03:00 Funny 2233

DPlayer Is a very easy to use h5 Video player , Support mp4,flv,m3u8 And barrage function , But the original backstage barrage address is basically hung up , Although there are https://dplayer.moerats.com It can be used for a long time , however , It is better to control the backstage by yourself , Can achieve some better functions

There are a large number of them on the Internet DPlayer The backstage is too complicated , Most of them are Docker Need to install a bunch of things , In fact, you only need to understand the interaction between the front and back console to find , The backstage of the barrage is very simple. You can write it yourself

The video begins to capture all the barrages

According to the video Id Get barrage data (GET)
https://dplayer.moerats.com/v3/?id=[id]
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-jJsEiWnd-1633173898786)(E:\ Text learning files \markdown\image\image-20211002171654467.png)]
 Insert picture description here

In order of order is Time type Color user Content

Send barrage request

Send the barrage (POST)
https://dplayer.moerats.com/v3/
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-ys8Jca22-1633174054607)(E:\ Text learning files \markdown\image\image-20211002171754689.png)]
 Insert picture description here
type Barrage type :1 Top 0 rolling 2 Bottom
 Insert picture description here
The return value of the request can also be zero data, Here I return the original object directly

For the rest, you can directly use your favorite language for background server development , In fact, it is very simple. Here we use Java For example

 Insert picture description here

原网站

版权声明
本文为[Funny 2233]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221430106394.html