camera.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import request from '@/utils/request'
  2. import { update } from './base'
  3. // 获取摄像头人流量
  4. export function getStatistic (params) {
  5. return request({
  6. url: `/camera/statistic`,
  7. method: 'GET',
  8. params
  9. })
  10. }
  11. // 获取摄像头当前的视频参数
  12. export function getVideoInfo (deviceId) {
  13. return request({
  14. url: `/camera/${deviceId}/video/param`,
  15. method: 'GET'
  16. })
  17. }
  18. // 获取摄像头可用的视频参数
  19. export function getAvailableParams () {
  20. return request({
  21. url: `/camera/video/availableParam`,
  22. method: 'GET'
  23. })
  24. }
  25. // 设置摄像头参数
  26. export function setCameraParams (data) {
  27. const { deviceId, ...params } = data
  28. return update({
  29. url: `/camera/${deviceId}/video/param`,
  30. method: 'PUT',
  31. data: params
  32. })
  33. }
  34. // 摄像头在线状态
  35. export function isOnline (identifier, options) {
  36. return request({
  37. url: `/camera/${identifier}/online`,
  38. method: 'GET',
  39. ...options
  40. })
  41. }
  42. // 直播流详情
  43. export function getStreamDetail (stream) {
  44. return request({
  45. url: `/${stream}/detail`,
  46. method: 'GET'
  47. })
  48. }