/**
* @Author              : Md. Delwar Hossain    
* @CreatedDate         : 31-07-17   
* @ModifiedDate        : Null
* @ModifiedBy          : Null
* @Route               : Null
* @Description         : get user latitude, longitude, device hight, width to save in db
* @view                : Null
* @redirect            : Null
* @deprecated          : No
* @exception           : 
* @inheritDoc          : 
* @Parameter           : null
* @Return              : null   
* @value               : latitude is used to keep latitude value
*                        longitude is used to keep longitude value
*                        width is used to keep screen width value
*                        height is used to keep screen height value
*                        url is used to keep routes url
*                        manage_video_id is used to keep manage_video_id value
*                        formdata is used to send input->post value by ajax
* @Status              : Available
* @version             : v2.1       
* */

$(document).ready(function() {
    if(navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
            var latitude = position.coords.latitude;
            var longitude = position.coords.longitude;
            var width = $( window ).width();
            var height = $( window ).height();
            var base_url = $('#baseUrl').val(); 
            var url = base_url + 'view-single-video-user-info'; 
            var manage_video_id = $('#manage_single_video_id').val();
            var formdata = new FormData(); 
            formdata.append("manage_video_id", manage_video_id);
            formdata.append("latitude", latitude);
            formdata.append("longitude", longitude);
            formdata.append("width", width);
            formdata.append("height", height);

            $.ajax({
                url: url,
                type: "POST",
                data: formdata,
                contentType: false,
                cache: false,
                processData: false,
                success: function ()
                {}
            });
        });
    }
});