matthewp / librivox-player.js

Javascript library for playing librivox audiobooks.

Home Page:http://matthewp.github.com/librivox-player.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project is an adaption of a Chrome Web App I created.  I'm trying to clean up the code so that the library can be used more generally.  Right now the Player class requires XHR, which isn't allowed due to the same origin policy (except for Chrome Apps).  However the Book class is still useful for Node.js environments.

I might convert this library over to CoffeeScript at some point.

Chrome web app example:

<script src="librivox-player-1.0.js" type="text/javascript"></script>
<audio id="player" src="" controls>audio not supported in your browser</audio>
<script type="text/javascript">
	AudioPlayer = new LibLib.Player(document.getElementById("player"));
	LibLib.Search("simple", "Frankenstein", function(results) {
		var Frankenstein = results[0];
		Frankenstein.loadChapters(function() {
			AudioPlayer.play(Frankenstein.chapters);
		});
	});
</script>

About

Javascript library for playing librivox audiobooks.

http://matthewp.github.com/librivox-player.js/


Languages

Language:JavaScript 98.4%Language:Shell 1.6%