Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the device connected through SDK cannot play the device video?

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to solve the problem that the device connected through SDK can not play the device video. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

EasyCVR video structured intelligent analysis platform supports video recording call and playback, including device video recording and cloud video recording. When EasyCVR docks the device video, we find that if the device is connected through SDK, it is impossible to play the device video.

By checking the parameters passed by the front-end calling interface, it is found that the time format passed by the front-end calling interface is yyyymmddhhmmss, but the back-end parsing is yyyy-mm-dd hh:mm:ss when receiving.

So you need to modify the code as follows to receive the time parameters passed by the front end, and then parse them into the corresponding back-end time format.

{stime, err: = time.ParseInLocation ("20060102150405", starttime, time.Local) if err! = nil {} else {s = fmt.Sprintf ("% d%d%d%d%d%d", stime.Year (), stime.Month (), stime.Day (), stime.Hour (), stime.Minute (), stime.Second () starttime = stime.Format ("2006-01-0215: 04:05")} {etime, err: = time.ParseInLocation ("20060102150405", endtime) Time.Local) if err! = nil {} else {e = fmt.Sprintf ("% d%d%d%d%d%d", etime.Year (), etime.Month (), etime.Day (), etime.Hour (), etime.Minute (), etime.Second ()) endtime = etime.Format ("2006-01-02 15:04:05")}}

The front end plays again and everything is fine.

The above is how to solve the problem that devices connected through SDK cannot play device videos. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report