ArcGIS for Developers

AppFrameworkMultimedia QML Type

Global object that provides miscellaneous helpful functions. More...

Import Statement: import ArcGIS.AppFramework.Multimedia 1.0

Methods

Detailed Description

The AppFrameworkMultimedia component is intended to handle miscellaneous functions relating to capturing media.

This code sample, from the Quick Report template app, demonstrates usage of the AppFrameworkMultimedia component. As part of setting up a camera object, the isCameraFlashModeSupported method is used to discern if the device supports camera flash.

Component.onCompleted: {
    Screen.orientationUpdateMask = Qt.PortraitOrientation | Qt.InvertedLandscapeOrientation | Qt.InvertedPortraitOrientation | Qt.LandscapeOrientation
    if (QtMultimedia.availableCameras.length > 0) {
        var cameraIndex = 0;
        for (var i = 0; i < QtMultimedia.availableCameras.length; i++) {
            if (QtMultimedia.availableCameras[i].deviceId === camera.deviceId) {
                cameraIndex = i;
                console.log("camera device found:", i, camera.deviceId);
                break;
            }
            if (QtMultimedia.availableCameras[i].position === Camera.BackFace) {
                cameraIndex = i;
                break;
            }
        }
        camera.deviceId = QtMultimedia.availableCameras[cameraIndex].deviceId;
        camera.start();
        isSupportFlash = AppFrameworkMultimedia.isCameraFlashModeSupported(camera, Camera.FlashOn);
        camera.stop();
    }

    Qt.inputMethod.hide();
    console.log("my orientation:", Screen.orientation)
}

Method Documentation

bool isCameraFlashModeSupported(camera, int mode)

Returns true if the given mode of camera flash is supported.

This method is being deprecated and will be removed in a future release of ArcGIS AppStudio. Please use the Qt property CameraFlash.supportedModes instead: https://doc.qt.io/qt-5/qml-qtmultimedia-cameraflash.html#supportedModes-prop

The camera parameter

If the multimedia object is Camera, or MediaObject.

The mode parameter

The type of camera flash that support is being checked for.