In the video-on-demand interface of the EasyDSS video platform, the search bar can currently perform fuzzy queries on file names. In the new version update, we need to add fuzzy queries on file tags to improve user experience.
After thinking and analysis, the realization of this function is mainly achieved by the server receiving the parameters of the search bar, verifying and judging, splicing the parameters and assigning them to the labels "labels".
Finally, the database query statement spliced into:
SELECT * FROM "vod_files" WHERE (dir_id in ('o6SX08qGR')) AND labels like '%ten;%' OR name like '%ten%'
After testing, we found that the realization of this requirement through the above method will result in searching for files in an unprivileged directory, as shown in the following figure:
After investigating the code, we found that the problem was caused by incorrectly splicing the database query statement, so we modified the query statement to:
SELECT * FROM "vod_files" WHERE (dir_id in ('o6SX08qGR')) AND ((labels like '%足球;%') OR (name like '%足球%'))
After solving, test the results again as shown in the figure below, and you can get the required results more accurately:
EasyDSS video platform does not need to install plug-ins to watch the live streaming of video. The webpage can be played directly, and the platform can be configured through the browser. It is convenient and controllable for users, and there is no need to build a server, which has great advantages.
Playing an RTMP protocol streaming media requires the following steps: handshake, establish a network connection, establish a network stream, and play. Only one network connection can be established between the server and the client, but many network streams can be created based on this connection, which is also a feature of the RTMP streaming protocol. Since many project teams have requirements for push streaming, I will introduce EasyDSS to you every time I encounter these situations, which is a streaming media server suitable for push streaming platforms.