Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor updates.

  • Loading branch information...
commit 1c53ee98060b19cc4c8f5617be8408b4ef6e9545 1 parent a9ee501
@podviaznikov authored
View
10 player.server.js
@@ -11,6 +11,7 @@ var util=require('util'),
secret:'99523abcd47bd54b5cfa10cf9bb81f20'
});
app=express.createServer();
+//init NBS api
nbs.init('mplayer');
app.configure(function(){
@@ -26,6 +27,15 @@ app.configure(function(){
app.use(app.router);
//public folder for static files
app.use(express.static(__dirname+'/public'));
+ //jade settings
+ //set path to the views (template) directory
+ app.set('views', __dirname + '/views');
+ app.set('view engine', 'jade');
+ app.set('view options', {layout: false});
+});
+//index page
+app.get('/', function(req,res){
+ res.render('index',{filename:__dirname+'/views/index.jade'});
});
app.get('/app.mf', function(req, res){
res.header('Content-Type', 'text/cache-manifest');
View
219 public/index.html
@@ -1,219 +0,0 @@
-<!DOCTYPE html>
-<html manifest="app.mf" lang="en">
-<head>
- <title>m.player - your favourite music player</title>
- <meta charset="utf-8"/>
- <meta name="author" content="Enginimation Studio (enginimation.com)"/>
- <meta name="description" content="Offline/online music player with Last.fm and Facebook integration"/>
- <meta name="keywords" content="player,music player,html5,offline player,lastfm,mp3,media player,facebook,fb,next big sound,nbs"/>
- <link rel="stylesheet" href="css/styles.css"/>
- <script src="js/lib/libs.bundle.js"></script>
- <script src="js/ext/data.service.js"></script>
- <script src="js/app.js"></script>
- <script>$(function(){AppController.init();});</script>
-</head>
-<body>
-<aside id="file_upload_status_dialog" class="modal_dialog">
- <section id="uploading_files_progress" class="dialog_content">
- <header>Importing: <span></span></header>
- <progress value="0" max="100"></progress><span id="file_index"></span>/<span id="total_files_amount"></span>
- </section>
-</aside>
-<section id="help_screen" class="screen_panel hidden">
- <section id="how_to_use" class="info_panel help_panel">
- <header><h1>How to use</h1></header>
- <section>
- <p>m.player - is modern offline/online audio player that works just in browser (it doesn't require Internet connection).
- You can drop music files from your file system (or import with special import buttons) inside the player and play them right now or come back later.</p>
- <p>Player has library using which you can navigate through you music. Library populated automatically each time
- you add new files to play. Information in the library integrated with <a href="http://last.fm">last.fm</a> service and <a href="http://nextbigsound.com">Next Big Sound</a>.</p>
- <p>All your music stored locally in the filesystem used by application. This is possible using latest HTML 5 technologies(Audio API, local storage, File System API, IndexedDB).</p>
- <p>Player has integration with Last.fm and Facebook. You can login with Last.fm account and your music will be scrobbled automatically to Last.fm.
- Also if you login with Facebook account all information about listened songs will be available on your Facebook wall.</p>
- <p>Project is open-source. You can join development <a href="https://github.com/podviaznikov/m.player">here</a>.</p>
- <p>Current version is 2.9. A lot of new functionality will be implemented in the upcoming months.</p>
- <p>Project is build by <a href="http://enginimation.com">Enginimation Studio</a>. Feel free to contact <a href="mailto:hello@enginimation.com">us</a> in any time with any reason.</p>
- </section>
- </section>
- <section id="hot_keys" class="info_panel help_panel">
- <header><h1>Hot keys</h1></header>
- <section>
- <div class="hot_key_row"><div class="cell key_combination">Space</div><div class="cell">Play/Pause</div></div>
- <div class="hot_key_row"><div class="cell key_combination">Enter</div><div class="cell">Play selected track</div></div>
- <div class="hot_key_row"><div class="cell key_combination">Delete</div><div class="cell">Delete selected track from playlist</div></div>
- <div class="hot_key_row"><div class="cell key_combination">Escape</div><div class="cell">Return to normal mode</div></div>
- <div class="hot_key_row"><div class="cell key_combination">Key up</div><div class="cell">Select previous track</div></div>
- <div class="hot_key_row"><div class="cell key_combination">Key down</div><div class="cell">Select next track</div></div>
- </section>
- </section>
- <section id="contributions" class="info_panel help_panel">
- <header><h1>Thanks</h1></header>
- <section>
- <span><a href="http://documentcloud.github.com/underscore/">underscore.js</a> - utility library for JavaScript.</span>
- <span><a href="http://documentcloud.github.com/backbone/">backbone.js</a> - tiny MVC framework that helped to organize code.</span>
- <span><a href="http://jquery.com/">jQuery</a> - the best cross-browser JavaScript library for dealing with DOM.</span>
- <span><a href="https://github.com/podviaznikov/fs.js">fs.js</a> - simple wrapper for HTML 5 File API.</span>
- <span><a href="https://github.com/aadsm/JavaScript-ID3-Reader">id3</a> - ID3 reader for JavaScript.</span>
- <span><a href="http://last.fm">last.fm</a> - great music service.</span>
- <span><a href="http://nextbigsound.com">Next Big Sound</a> - gives you information about artists' social profiles.</span>
- <span><a href="https://github.com/podviaznikov/porridge.js">porridge.js</a> - simple wrapper for HTML 5 IndexedDB.</span>
- <span><a href="https://github.com/podviaznikov/backbone-indexdb">backbone-indexdb</a> - backbone adapter for IndexedDB.</span>
- <span><a href="http://nodejs.org">Node.js</a> - server side JavaScript environment.</span>
- <span><a href="http://expressjs.com/">Express.js</a> - web framework for node.js.</span>
- <span><a href="https://github.com/jammus/lastfm-node">lastfm-node</a> - node.js API for last.fm.</span>
- <span><a href="https://github.com/gasi/node-facebook-graph">Facebook graph</a> - Facebook Node.js SDK</span>
- </section>
- </section>
-</section>
-<section id="playing_visualization"></section>
-<section id="main_screen" class="screen_panel">
- <section id="library_menu" class="info_panel main_panel">
- <header>
- <h1 id="show_artists">Artists</h1>
- <h1 id="show_albums">Albums</h1>
- <h1 id="show_playlists">Playlists</h1>
- <h1 id="show_soundcloud" class="hidden">SoundCloud</h1>
- <input placeholder="Search artist" type="search" maxlength="16" autocomplete="on">
- </header>
- <section id="artists_library_content" class="library_content_panel scrollable_panel"></section>
- <section id="albums_library_content" class="library_content_panel scrollable_panel"></section>
- <section id="playlists_library_content" class="library_content_panel scrollable_panel"></section>
- <section id="soundcloud_library_content" class="library_content_panel scrollable_panel"></section>
- </section>
- <section id="filtered_lib" class="info_panel main_panel">
- <header><h1>Albums</h1><h1>Bio</h1></header>
- <section id="filtered_lib_content" class="scrollable_panel"></section>
- <article id="artist_bio"></article>
- </section>
- <section id="playing_list" class="info_panel main_panel">
- <header class="box"><h1>Now playing</h1></header>
- <section id="song_info_view"></section>
- <section id="playlist_toolbar">
- <input id="new_play_list" value="Unsaved list" maxlength="18">
- <input type="file" id="drop_files" accept="audio/*" multiple>
- <input type="file" id="drop_folder" accept="audio/*" multiple webkitdirectory>
- <span id="clear_playlist" class="command_link" title="Clear playlist">Clear</span>
- <span id="import_songs_directory" class="command_link" title="Import music directory">Import directory</span>
- <span id="import_songs_files" class="command_link" title="Import music files">Import files</span>
- </section>
- <section id="playing_songs" class="scrollable_panel">
- <label>Drop mp3 files here</label>
- </section>
- <footer></footer>
- </section>
-</section>
-<footer id="player">
- <section id="main_controls_panel">
- <span id="shuffle_toggle" class="control off" title="Turn shuffle on"></span>
- <span id="repeat_toggle" class="control on" title="Turn repeat off"></span>
- <span id="stop_song" class="control" title="Stop"></span>
- <span id="previous_song" class="control" title="Previous"></span>
- <span id="play_toggle" class="control paused" title="Play"></span>
- <span id="next_song" class="control" title="Next"></span>
- <span id="sound_toggle" class="control on" title="Mute"></span>
- <meter id ="volume_slider" value="0.5" min="0" max="1"></meter>
- <progress id="music_slider" value="0"></progress>
- <label id="time_counter">0:00</label>
- <span id="help" class="control off" title="Help"></span>
- <span id="expand" class="control on" title="Full screen mode"></span>
- </section>
- <section id="social_controls_panel" class="hidden">
- <fieldset id="sc_control_panel" class="unlogined">
- <label id="sc_username" class="authorised"></label>
- <a id="sc_logout_btn" class="social_logout control authorised" title="Logout from SoundCloud"></a>
- <a id="sc_login_btn" class="control" title="Login to SoundCloud" href="https://soundcloud.com/connect?scope=non-expiring&response_type=token&display=popup&client_id=1ef8d74100e28b577620e0243874233e&redirect_uri=http://player.enginimation.com">SC</a>
- </fieldset>
- <fieldset id="fb_control_panel" class="unlogined">
- <span id="fb_icon" class="control authorised" title="Facebook"></span>
- <label id="fb_username" class="authorised"></label>
- <a id="fb_logout_btn" class="social_logout control authorised" title="Logout from Facebook"></a>
- <a id="fb_login_btn" class="control" title="Login to Facebook" href="https://www.facebook.com/dialog/oauth?client_id=222066051151670&redirect_uri=http://player.enginimation.com&scope=email,read_stream,offline_access&response_type=token"></a>
- </fieldset>
- <fieldset id="lastfm_control_panel" class="unlogined">
- <span id="lastfm_icon" class="control authorised" title="Last.fm"></span>
- <label id="lastfm_username" class="authorised"></label>
- <span id="lastfm_logout_btn" class="social_logout control authorised" title="Logout from Last fm"></span>
- <a id="lastfm_login_btn" href="http://www.last.fm/api/auth/?api_key=e3377f4b4d8c6de47c7e2c81485a65f5" class="control" title="Login to Last.fm"></a>
- </fieldset>
- </section>
- <span id="social" class="control off" title="Social"></span>
- <audio id="player_ctrl"></audio>
-</footer>
-<script type="text/html" id="song_tpl">
- <div class="song cell track_number"><%= track %></div>
- <div class="song cell"><%= title %></div>
- <div class="song cell delete_album_song">Delete</div>
-</script>
-<script type="text/html" id="song_mini_tpl">
- <div class="song cell"><%= title %></div>
-</script>
-<script type="text/html" id="playlist_stat_tpl"><label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span></script>
-<script type="text/html" id="artist_tpl">
- <span class="info_image"><img src="<%= image %>"></span>
- <section class="lib-item-info">
- <h1><%= name %></h1>
- <div class="artist_albums"><% _.each(albums, function(album) { %> <a class="album_link" data-album="<%= album %>"><%= album %></a> <% }); %></div>
- <div class="genres_box"><label>Genres</label><% _.each(genres, function(genre) { %> <a rel="tag" class="genre_link"><%= genre %></a> <% }); %></div>
- <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span></div>
- <footer>
- <span class="bio_artist command_link" title="Show artist's bio">Bio</span>
- <span class="delete_artist command_link" title="Delete this artist from library">Delete</span>
- </footer>
- </section>
-</script>
-<script type="text/html" id="saved_playlist_tpl">
- <span class="info_image"><img src="<%= image %>"></span>
- <section class="lib-item-info">
- <h1><%= name %></h1>
- <div class="genres_box"><label>Genres</label><% _.each(genres, function(genre) { %> <a rel="tag" class="genre_link"><%= genre %></a> <% }); %></div>
- <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span></div>
- <footer class="saved_playlist_toolbar">
- <span class="delete_playlist command_link" title="Delete this playlist">Delete</span>
- </footer>
- </section>
-</script>
-<script type="text/html" id="album_lib_tpl">
- <span class="info_image"><img src="<%= image %>"></span>
- <section class="lib-item-info">
- <h1><%= name %></h1>
- <h2><%= artist %></h2>
- <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songs.length %></span></div>
- </section>
-</script>
-<script type="text/html" id="visualization_tpl"><img src="<%= image %>"></script>
-<script type="text/html" id="detailed_album_info_tpl">
- <span class="info_image"><img src="<%= image %>"></span>
- <section class="detailed_album_info">
- <h1><%= name %></h1>
- <span class="release_date"><%= releaseDate %></span>
- </section>
-</script>
-<script type="text/html" id="detailed_playlist_info_tpl">
- <section class="detailed_album_info_panel box">
- <span class="info_image"><img src="<%= image %>"></span>
- <section class="detailed_album_info">
- <h1><%= name %></h1>
- </section>
- </section>
-</script>
-<script type="text/html" id="song_info_tpl">
- <span id="song_image" class="info_image"><img src="<%= image %>"></span>
- <section id="song_info">
- <h1><%= title %></h1>
- <span class="data_info_row"><%= album %></span>
- <span class="data_info_row"><%= artist %></span>
- <span class="data_info_row"><%= year %></span>
- </section>
-</script>
-<script type="text/html" id="sound_cloud_track_menu_tpl">
- <h1><%= name %></h1>
-</script>
-<script type="text/html" id="artist_bio_tpl">
- <section><%= bio %></section>
- <section>
- <h2>Social profiles:</h2>
- <% _.each(profiles, function(profile) { %><a rel="network" target="_blank" class="profile_link" href="<%= profile.url %>"><%= profile.name %></a> <% }); %>
- </section>
-</script>
-</body>
-</html>
View
7 views/file_upload_dialog.jade
@@ -0,0 +1,7 @@
+aside#file_upload_status_dialog.modal_dialog
+ section#uploading_files_progress.dialog_content
+ header Importing:
+ span
+ progress(value="0",max="100")
+ span#file_index
+ span#total_files_amount
View
68 views/templates.jade
@@ -0,0 +1,68 @@
+script#song_tpl(type="text/html")
+ <div class="song cell track_number"><%= track %></div>
+ <div class="song cell"><%= title %></div>
+ <div class="song cell delete_album_song">Delete</div>
+script#song_mini_tpl(type="text/html")
+ <div class="song cell"><%= title %></div>
+script#playlist_stat_tpl(type="text/html")
+ <label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span>
+script#artist_tpl(type="text/html")
+ |<span class="info_image"><img src="<%= image %>"></span>
+ |<section class="lib-item-info">
+ | <h1><%= name %></h1>
+ | <div class="artist_albums"><% _.each(albums, function(album) { %> <a class="album_link" data-album="<%= album %>"><%= album %></a> <% }); %></div>
+ | <div class="genres_box"><label>Genres</label><% _.each(genres, function(genre) { %> <a rel="tag.genre_link"><%= genre %></a> <% }); %></div>
+ | <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span></div>
+ | <footer>
+ | <span class="bio_artist command_link" title="Show artist's bio">Bio</span>
+ | <span class="delete_artist command_link" title="Delete this artist from library">Delete</span>
+ | </footer>
+ | </section>
+script#saved_playlist_tpl(type="text/html")
+ |<span class="info_image"><img src="<%= image %>"></span>
+ |<section class="lib-item-info">
+ | <h1><%= name %></h1>
+ | <div class="genres_box"><label>Genres</label><% _.each(genres, function(genre) { %> <a rel="tag.genre_link"><%= genre %></a> <% }); %></div>
+ | <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songsCount %></span></div>
+ | <footer class="saved_playlist_toolbar">
+ | <span class="delete_playlist command_link" title="Delete this playlist">Delete</span>
+ | </footer>
+ |</section>
+script#album_lib_tpl(type="text/html")
+ |<span class="info_image"><img src="<%= image %>"></span>
+ |<section class="lib-item-info">
+ | <h1><%= name %></h1>
+ | <h2><%= artist %></h2>
+ | <div class="song_count"><label for="song_count">Songs</label><span class="song_count"><%= songs.length %></span></div>
+ |</section>
+script#visualization_tpl(type="text/html")
+ <img src="<%= image %>">
+script#detailed_album_info_tpl(type="text/html")
+ |<span class="info_image"><img src="<%= image %>"></span>
+ |<section class="detailed_album_info">
+ | <h1><%= name %></h1>
+ | <span class="release_date"><%= releaseDate %></span>
+ |</section>
+script#detailed_playlist_info_tpl(type="text/html")
+ |<section class="detailed_album_info_panel box">
+ | <span class="info_image"><img src="<%= image %>"></span>
+ | <section class="detailed_album_info">
+ | <h1><%= name %></h1>
+ | </section>
+ |</section>
+script#song_info_tpl(type="text/html")
+ |<span id="song_image" class="info_image"><img src="<%= image %>"></span>
+ |<section id="song_info">
+ | <h1><%= title %></h1>
+ | <span class="data_info_row"><%= album %></span>
+ | <span class="data_info_row"><%= artist %></span>
+ | <span class="data_info_row"><%= year %></span>
+ |</section>
+script#sound_cloud_track_menu_tpl(type="text/html")
+ <h1><%= name %></h1>
+script#artist_bio_tpl(type="text/html")
+ |<section><%= bio %></section>
+ |<section>
+ | <h2>Social profiles:</h2>
+ | <% _.each(profiles, function(profile) { %><a rel="network" target="_blank.profile_link" href="<%= profile.url %>"><%= profile.name %></a> <% }); %>
+ |</section>
Please sign in to comment.
Something went wrong with that request. Please try again.