Last updated:
0 purchases
onvif
ONVIF #
This package is designed to find CCTV cameras that support the ONVIF protocol. The method for finding these cameras is the [WS-Discovery](https://en.wikipedia.org/wiki/WS-Discovery) protocol.
How to use #
import 'package:onvif/Model/OnvifDevice.dart';
import 'package:onvif/onvif.dart';
copied to clipboard
Create an ONVIF object and call the get Devices method.
List<OnvifDevice> devices = [];
ONVIF onvif = ONVIF();
onvif.getDevices((device){
devices.add(device);
});
copied to clipboard
To get the streaming link , all you have to do is call the getCameraUri function and send the username and password values of the camera you specified as an argument.
String uri = await onvif.getCameraUri(onvifDev, username, password);
copied to clipboard
You can play the resulting url with the vlc player. Note that to play the contents of the camera, you must change the resulting url to the following pattern.
uri.substring(0 , 7)+ "$username:$password@"+ url.substring(7 , url.length)
copied to clipboard
See the example project for a better understanding.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.