<commit_before><doctype html5>
<html ng-app='audioDemo'>
	<head>
		<title>Angular Audio Demo</title>
		<script src='lib/underscore.js'></script>
		<script src='lib/angular.js'></script>
		<script src='angular.audio.js'></script>

		<link href="css/shCore.css" rel="stylesheet" type="text/css">
		<link href="css/shThemeDefault.css" rel="stylesheet" type="text/css">
		<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
		<script src="lib/syntax/shCore.js" type="text/javascript"></script>
		<script src="lib/syntax/shAutoloader.js" type="text/javascript"></script>
		<script src="lib/syntax/shBrushXml.js" type="text/javascript"></script>

		<style>
			table {
				border: 1px solid gray;
				border-collapse: collapse;
			}
			table td {
				border: 1px solid gray;
			}

			.SyntaxHighlighter {
			/*	overflow-y: hidden !important;*/
			}

			button {
				padding: 8px;
			}
		</style>

	</head>
	<body class='container' ng-controller='audioDemo'>
	<div class='pin'>
		<a href="https://github.com/danielstern/ngAudio">View on Github</a>
	</div>

	<h1>Angular Audio</h1>
	<h2>Using the Directive to Play a Sound</h2>
	<p>
		You can play any sound that has been added to the DOM by adding ngAudio to any clickable element (like a button)
	</p>
	<pre class="brush: html; toolbar: false;">
&lt;audio id='click1'&gt;
	&lt;source src=&quot;audio/click.mp3&quot; type=&quot;audio/mp3&quot;&gt;
&lt;/audio&gt;

&lt;button ng-audio='click1'&gt;Click me and an embedded sound will play&lt;/button&gt;
		</pre>
	<button ng-audio='click1'>Click me and an embedded sound will play</button>
	<h3>Using a URL</h3>
		<p>
			Alternatively, you can specify a URL. In that case, the URL will be loaded, and then played.
		</p>

			<pre class="brush: html; toolbar: false;">
&lt;button ng-audio='audio/exit.mp3'&gt;I'll load a sound and then play it.&lt;/button&gt;			</pre>

		<audio ng-audio id='click1'>
		  <source src="audio/click.mp3" type="audio/mp3">
		</audio>

		<ng-audio id='click2' src='audio/click2.mp3'>
		</ng-audio>
		<div>
	
	</div>
	<div>
		<button ng-audio='audio/exit.mp3'>I'll load a sound and then play it.</button>
	</div>

	<h2>Using Code to Play Songs</h2>
	<pre class="brush: js; toolbar: false;">
<button ng-click="playSound('click2')">I play a sound by referring to the ID of an audio tag</button>

<audio id='click2' src='audio/click2.mp3'></audio>

<script>
angular.module('audioDemo',['ngAudio'])
.controller('audioDemo',function($scope,ngAudio){
	
	$scope.playSound = function(str) {
		ngAudio.play(str);
	}
</script>
	</pre>
	<button ng-click="playSound('click2')">I play a sound by referring to the ID of an audio tag</button>

	<h3>Specifying a URL with Code</h2>
	<p>The ngAudio provides a handy way to simply load a sound and play it.</p>
		<pre class="brush: js; toolbar: false;">
	<button ng-click="playSound('audio/click3.mp3')">I play a sound by referring to a url</button>

	<script>
	angular.module('audioDemo',['ngAudio'])
	.controller('audioDemo',function($scope,ngAudio){
		
		$scope.playSound = function(str) {
			ngAudio.play(str);
		}
	</script>
		</pre>
	<button ng-click="playSound('audio/click3.mp3')">I play a sound by referring to a url</button>

	<h2>Defining Special Properties with Directives</h2>
	<p>By using an ngAudio tag or attribute with or instead of an audio tag, you can declaratively add more functionality to a sound.</p>

	 	<pre class="brush: xml; toolbar: false;">
	 		&lt;ng-audio
			 id='song3' 
			 song
			 volume='0.4' 
			 startAt=&quot;10&quot; 
			 src='audio/song3.mp3'&gt;
			&lt;/ng-audio&gt;
<commit_msg>fixed error on fp<commit_after><doctype html5>
<html ng-app='audioDemo'>
	<head>
		<title>Angular Audio Demo</title>
		<script src='lib/underscore.js'></script>
		<script src='lib/angular.js'></script>
		<script src='angular.audio.js'></script>

		<link href="css/shCore.css" rel="stylesheet" type="text/css">
		<link href="css/shThemeDefault.css" rel="stylesheet" type="text/css">
		<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
		<script src="lib/syntax/shCore.js" type="text/javascript"></script>
		<script src="lib/syntax/shAutoloader.js" type="text/javascript"></script>
		<script src="lib/syntax/shBrushXml.js" type="text/javascript"></script>

		<style>
			table {
				border: 1px solid gray;
				border-collapse: collapse;
			}
			table td {
				border: 1px solid gray;
			}

			.SyntaxHighlighter {
			/*	overflow-y: hidden !important;*/
			}

			button {
				padding: 8px;
			}
		</style>

	</head>
	<body class='container' ng-controller='audioDemo'>
	<div class='pin'>
		<a href="https://github.com/danielstern/ngAudio">View on Github</a>
	</div>

	<h1>Angular Audio</h1>
	<h2>Using the Directive to Play a Sound</h2>
	<p>
		You can play any sound that has been added to the DOM by adding ngAudio to any clickable element (like a button)
	</p>
	<pre class="brush: html; toolbar: false;">
&lt;audio id='click1'&gt;
	&lt;source src=&quot;audio/click.mp3&quot; type=&quot;audio/mp3&quot;&gt;
&lt;/audio&gt;

&lt;button ng-audio='click1'&gt;Click me and an embedded sound will play&lt;/button&gt;
		</pre>
	<button ng-audio='click1'>Click me and an embedded sound will play</button>
	<h3>Using a URL</h3>
		<p>
			Alternatively, you can specify a URL. In that case, the URL will be loaded, and then played.
		</p>

			<pre class="brush: html; toolbar: false;">
&lt;button ng-audio='audio/exit.mp3'&gt;I'll load a sound and then play it.&lt;/button&gt;			</pre>

		<audio ng-audio id='click1'>
		  <source src="audio/click.mp3" type="audio/mp3">
		</audio>

		<ng-audio id='click2' src='audio/click2.mp3'>
		</ng-audio>
		<div>
	
	</div>
	<div>
		<button ng-audio='audio/exit.mp3'>I'll load a sound and then play it.</button>
	</div>

	<h2>Using Code to Play Songs</h2>
	<pre class="brush: js; toolbar: false;">
<button ng-click="playSound('click2')">I play a sound by referring to the ID of an audio tag</button>

<audio id='click2' src='audio/click2.mp3'></audio>

<script>
angular.module('audioDemo',['ngAudio'])
.controller('audioDemo',function($scope,ngAudio){
	
	$scope.playSound = function(str) {
		ngAudio.play(str);
	}

});
</script>
	</pre>
	<button ng-click="playSound('click2')">I play a sound by referring to the ID of an audio tag</button>

	<h3>Specifying a URL with Code</h2>
	<p>The ngAudio provides a handy way to simply load a sound and play it.</p>
		<pre class="brush: js; toolbar: false;">
	<button ng-click="playSound('audio/click3.mp3')">I play a sound by referring to a url</button>

	<script>
	angular.module('audioDemo',['ngAudio'])
	.controller('audioDemo',function($scope,ngAudio){
		
		$scope.playSound = function(str) {
			ngAudio.play(str);
		}

		});
	</script>
		</pre>
	<button ng-click="playSound('audio/click3.mp3')">I play a sound by referring to a url</button>

	<h2>Defining Special Properties with Directives</h2>
	<p>By using an ngAudio tag or attribute with or instead of an audio tag, you can declaratively add more functionality to a sound.</p>

	 	<pre class="brush: xml; toolbar: false;">
	 		&lt;ng-audio
			 id='song3' 
			 song
			 volume='0.4' 
			 startAt=&quot;10&quot; 
			 src='audio/song3.mp3'&gt;
			&lt;/ng-audio&gt;

{'fraction_non_alphanumeric': 0.17121380846325168, 'fraction_numerical': 0.01252783964365256, 'mean_word_length': 4.244525547445256, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 171, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5466118', 'n_tokens_mistral': 2862, 'n_tokens_neox': 2561, 'n_words': 669}