Camera pluging

I am trying to use the camera in the device and getting the following error:

Error: This operation is not supported in the environment this application is running on. “location.protocol” must be http or https and web storage must be enabled.

This is the code for the camera.

import { Camera } from ‘ionic-native’;

addPhotos() {
    Camera.getPicture({
            destinationType: Camera.DestinationType.DATA_URL,
            targetHeight: 400,
            targetWidth: 600,
        }).then((imageData) => {
                    this.photo.push("data:image/jpeg;base64," + imageData);
                }, (err) => {
                    console.log(err);
                }
            );
}

Can’t figure out what’s going on.