MediaSamplingPackage class
The sampling package for capturing audio (incl. noise) and video (incl. images).
Register it before you deploy a protocol that uses its measure types:
SamplingPackageRegistry().register(MediaSamplingPackage());
Key points:
- AUDIO and NOISE use the microphone and request the microphone permission.
- VIDEO and IMAGE do not collect anything themselves. The app records the media and must request the camera permission itself (see VideoProbe).
- Media files are stored in the MEDIA_FILES_PATH folder of the deployment's data folder.
See also AudioProbe and NoiseProbe.
- Inheritance
-
- Object
- SamplingPackage
- SmartphoneSamplingPackage
- MediaSamplingPackage
Constructors
Properties
-
dataTypes
→ List<
DataTypeMetaData> -
The data types this package supports.
no setterinherited
-
deviceManager
→ DeviceManager<
DeviceConfiguration< DeviceRegistration> , DeviceRegistration> -
Get the
DeviceManagerfor the device used by this package.no setterinherited - deviceType → String
-
The type of device this package collects data from.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingSchemes → DataTypeSamplingSchemeMap
-
The default sampling schemes for all dataTypes in this package.
no setteroverride
Methods
-
create(
String type) → Probe? -
Creates a new
Probeof the specifiedtype. Note thattypeshould be one of the dataTypes that this package supports. Returns null if a probe cannot be created for thetype.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRegister(
) → void -
Called when this package is registered in the
SamplingPackageRegistry.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- AUDIO → const String
- Measure type for one-time collection of audio from the phone's microphone.
- IMAGE → const String
- Measure type for an image captured by the app (ImageMedia).
- MEDIA_FILES_PATH → const String
- The name of the folder used for storing media files.
- NOISE → const String
- Measure type for periodic collection of noise data from the phone's microphone.
- VIDEO → const String
- Measure type for a video recorded by the app (VideoMedia).