<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>HTML5</title>
    <link rel="stylesheet" href="styles.css" type="text/css"/>
    
	<script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui.min.js"></script>
    
    <link rel="stylesheet" href="css/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.9.1.js"></script>
	<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

	<script type="text/javascript">
		var gbIntTipoUsuario = 0;
	</script>

	<!-- JQuery -->
    <script type="text/javascript" language="javascript">
	
    function hasGetUserMedia() {
	  return !!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia);
	}
	
	function init(){
		console.log("entrando a init");
		if (hasGetUserMedia()) {
		  console.log("tiene media");
		} else {
		  alert('getUserMedia() is not supported in your browser');
		}
	}
	
	var errorCallback = function(e) {
		console.log('Reeeejected!', e);
	};
	
	function setVideoMedia(){
		navigator.getUserMedia  = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
		
		var video = document.querySelector('video');
		
		if (navigator.getUserMedia) {
		  navigator.getUserMedia({audio: false, video: true}, function(stream) { video.src = window.URL.createObjectURL(stream); }, errorCallback);
		} else {
		  video.src = 'somevideo.webm'; // fallback.
		}	
	}
	
	$(document).ready(function() 
 
		// Request 
		$.getJSON("http://vaas.acapela-group.com/webservices/1-32-01-JSON/synthesizer.php?jsoncallback=?", {
			prot_vers: 2, cl_login: "EXAMPLE_ID", cl_app: "EXAMPLE_APP", cl_pwd: "x0hzls5cqs", 
			req_voice:"ryan22k", 
			req_text:"Hola como estas, como te va?"
		  },function(data){
			 // Data exploitation 
			 $("#demo1player").html("");	
		  }	
		 
		 
	);
		
    </script>

</head>

<body >
	<div id="demo1player"></div>
    
	<video autoplay></video>

    <input type="file" accept="image/*;capture=camera">
    Recording a video or audio is similar:
    
    <input type="file" accept="video/*;capture=camcorder">
    <input type="file" accept="audio/*;capture=microphone">

</body>
</html>
