Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Development' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
jcme committed May 9, 2015
2 parents ade1cb6 + 96f20bb commit efb0d42
Show file tree
Hide file tree
Showing 90 changed files with 6,709 additions and 5,748 deletions.
13 changes: 8 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ module.exports = function(grunt) {
quotmark: 'single',
jquery: true,
maxparams: 5,
// TODO: Reduce these values.
maxdepth: 4,
maxstatements: 50,
maxcomplexity: 13,
maxlen: 90001,
maxstatements: 25,
maxcomplexity: 10,
maxlen: 200,
// Don't validate third-party libraries
ignores: ['src/js/thirdParty/**/*.js']
},
Expand Down Expand Up @@ -151,7 +150,7 @@ module.exports = function(grunt) {
to: 'localDebug: false'
}]
},
// Replace debugging and non-concatenated file references in manifest.json
// Remove development key and comments from manifest for deployment
transformManifest: {
src: ['dist/manifest.json'],
overwrite: true,
Expand All @@ -162,6 +161,10 @@ module.exports = function(grunt) {
// Don't remove key when testing because server will throw CORS errors.
return isDebug ? match : '';
}
}, {
// Remove comments because they can't be uploaded to the web store.
from: /\/\/ .*/ig,
to: ''
}]
}
},
Expand Down
113 changes: 58 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,90 @@
<h1 align="center">Streamus</h1>
<p align="center">The most popular Chrome extension YouTube music player</p>
<p align="center">The most popular Chrome extension YouTube music player.</p>
<p align="center">
<a title='Build Status' href="https://travis-ci.org/MeoMix/StreamusChromeExtension">
<img src='https://travis-ci.org/MeoMix/StreamusChromeExtension.svg?branch=Development' />
</a>
</p>

Overview
========
<h2>Overview</h2>

Streamus consists of a front-end client, the Google Chrome extension, a back-end server and a website. This repository contains the files for the Google Chrome extension. Please see the other repositories, [StreamusServer](https://github.com/MeoMix/StreamusServer) and [StreamusWebsite](https://github.com/MeoMix/StreamusWebsite), to gain a full understanding of the product.
Streamus currently only supports YouTube's API, but will be expanding to SoundCloud shortly.
This is the repository for Streamus the browser extension. The source for Streamus' [server](https://github.com/MeoMix/StreamusServer) and [website](https://github.com/MeoMix/StreamusWebsite) are located in their own, respective repositories.

Development
========
Streamus is currently supported on all derivatives of WebKit such as [Chrome](http://www.google.com/chrome/), [Opera](http://www.opera.com/computer/windows), [Slimjet](http://www.slimjet.com/en/), and [Iron](https://www.srware.net/en/software_srware_iron.php). Additionally, it will support [Edge](http://windows.microsoft.com/en-us/windows/preview-microsoft-edge-pc) once stable.

1. Navigate to: chrome://extensions/
2. Enabled developer mode by checking the 'Developer mode' checkbox. This will introduce several new buttons to the chrome://extensions page
3. Click the button 'Load unpacked extension...'
4. Select the directory '/Streamus Chrome Extension/src/'
5. Streamus is now loaded and can be developed upon.
It can be installed through the [Chrome Web Store](https://chrome.google.com/webstore/detail/streamus/jbnkffmindojffecdhbbmekbmkkfpmjd/), the [Opera Web Store](https://addons.opera.com/en/extensions/details/streamustm-beta/), or from the [Streamus website](https://streamus.com/)

**API KEYS:**
You will need to modify the example key files located in the 'js/background/key/' directory. Production keys are not committed to GitHub.
<h2>Development</h2>

**SERVER SETTINGS:**
Ensure that the property 'localDebug' is set to **false** unless you have configured an instance of Streamus' server on your local machine. The localDebug property can be found at 'src/js/background/application.js'.
Start by cloning the development branch. All PRs should be submitted to the development branch.

Testing
------
Test cases may be ran by navigating to chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/test.html, but only after the extension package has been loaded into Google Chrome.
<h3>Dependencies</h3>
You will need to have [Node](https://nodejs.org/) installed on your system as well as [Grunt](http://gruntjs.com/). After installing Node, navigate using a terminal to the directory in which you cloned Streamus. Then, perform the following command to install dependencies:

Streamus uses [Mocha](http://mochajs.org/), [Chai](http://chaijs.com/), and [Sinon](http://sinonjs.org/) for its test cases.
npm install

Deployment
========
<h3>Loading the extension</h3>
1. Navigate to **chrome://extensions/**
2. Ensure the checkbox labeled **Developer mode** is enabled.
3. Click the button labeled **Load unpacked extension...**
4. Select the directory **/StreamusChromeExtension/src/**

Streamus utilizes NodeJS and GruntJS to bundle and package itself for deployment to the Chrome Web Store.
Run "grunt deploy" to generate a new dist folder. Provide a version number, i.e. "grunt deploy:0.103" to generate a .zip file and adjust the build version.
Uploading the .zip file to the Chrome Web Store will cause the new version to be distributed to all users within an hour.

Supported Functionality
========
<img src='http://i.imgur.com/1fckCGn.png' />

* YouTube search
* Add YouTube video to playlist
* Add YouTube playlist as playlist
* Add YouTube channel as playlist
* Play, pause, skip, rewind, shuffle, repeat video, repeat playlist
* Discovery of songs via radio
* Desktop notifications of currently playing video
* Customizable keyboard shortcuts
* Sharing of playlists via URL
* Enhancement of YouTube video pages with button for adding songs to playlists
* Enhancement of Beatport with Streamus buttons for listening to full songs
<h3>Editing LESS</h3>
Streamus' CSS is compiled via [LESS](http://lesscss.org/). As such, you need to run the following command from the '/StreamusChromeExtension' directory before modifying any LESS files:

Usage Demo
========
grunt watch

A video explanation of how to use Streamus can be found [here on YouTube](https://www.youtube.com/watch?v=sVxncDakIdA)
After this command is running all modifications to .less files will automatically be compiled into .css.

Third-Party Libraries
------
<img src='http://i.imgur.com/bzEn7Ny.png' />

Streamus utilizes several third-party libraries. Here's a list of those most prominent:
<h3>API keys</h3>
You will need to modify the example key files located in the [/js/background/key/](https://github.com/MeoMix/StreamusChromeExtension/tree/Development/src/js/background/key) directory. Production keys are not committed to GitHub. There is an example key provided. It should not be relied upon for anything other than testing.

* [BackboneJS](http://backbonejs.org/)
* [Backbone LocalStorage](https://github.com/jeromegn/Backbone.localStorage)
* [Backbone MarionetteJS](http://marionettejs.com)
* [Chai](http://chaijs.com/)
<img src='http://i.imgur.com/Oyb7KqV.png' />

<h3>Server settings</h3>
Ensure that the property 'localDebug' is set to **false** unless you have configured an instance of Streamus' server on your local machine. The localDebug property can be found at [/js/background/application.js](https://github.com/MeoMix/StreamusChromeExtension/blob/Development/src/js/background/application.js).

<img src='http://i.imgur.com/S7iLhtI.png' />

<h3>Testing</h3>
Test cases may be ran by navigating to chrome-extension://jbnkffmindojffecdhbbmekbmkkfpmjd/test.html, but only after the extension package has been loaded into Google Chrome.

<img src='http://i.imgur.com/OGBCmTz.png' />

<h2>Libraries</h2>

Streamus uses a fair number of third-party JavaScript libraries. Introduction of additional libraries for off-the-shelf functionality is discouraged. Non-core libraries may be removed in the near future and additional functionality should not be implemented with them.

<h3>Core</h3>
* [jQuery](http://jquery.com/)
* [Backbone](http://backbonejs.org/)
* [Marionette](http://marionettejs.com)
* [Lo-Dash](http://lodash.com/)
* [Require](http://requirejs.org/)
* [Text](https://github.com/requirejs/text)

<h3>Non-core</h3>
* [Backbone LocalStorage](https://github.com/jeromegn/Backbone.localStorage)
* [jQuery UI](http://jqueryui.com/)
* [jQuery Perfect Scrollbar](http://noraesae.github.io/perfect-scrollbar/)
* [jQuery qTip](http://qtip2.com/)
* [Less](http://lesscss.org)
* [Lo-Dash](http://lodash.com/)

<h3>Testing</h3>
* [Mocha](http://visionmedia.github.io/mocha/)
* [RequireJS](http://requirejs.org/)
* [Chai](http://chaijs.com/)
* [Sinon](http://sinonjs.org/)
* [Text](https://github.com/requirejs/text)

License
=======
<h2>Authors</h2>

* [MeoMix](https://github.com/MeoMix)

with translation support provided by a community of volunteers.

<h2>License</h2>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use any files in this repository except in compliance with the License.
Expand Down
14 changes: 13 additions & 1 deletion Streamus Chrome Extension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,28 @@
<Content Include="src\js\background\model\analyticsManager.js" />
<Content Include="src\js\common\enum\desktopNotificationDuration.js" />
<Content Include="src\js\common\lodashMixin.js" />
<Content Include="src\js\contentScript\interceptor.js" />
<Content Include="src\js\foreground\model\mediaSourceWrapper.js" />
<Content Include="src\js\foreground\model\sourceBufferWrapper.js" />
<Content Include="src\js\foreground\enum\keyboardKey.js" />
<Content Include="src\js\foreground\view\element\simpleMenuItemsView.js" />
<Content Include="src\js\foreground\view\leftPane\activePlaylistAreaView.js" />
<Content Include="src\js\foreground\view\leftPane\leftPaneRegion.js" />
<Content Include="src\js\foreground\view\leftPane\leftPaneView.js" />
<Content Include="src\js\foreground\view\leftPane\playlistItemsView.js" />
<Content Include="src\js\foreground\view\leftPane\playlistItemView.js" />
<Content Include="src\js\foreground\view\leftPane\signInView.js" />
<Content Include="src\js\foreground\view\listItemButton\extraActionsButtonView.js" />
<Content Include="src\js\foreground\view\video\videoRegion.js" />
<Content Include="src\js\foreground\view\video\videoView.js" />
<Content Include="src\js\thirdParty\test\chai.js" />
<Content Include="src\js\thirdParty\test\mocha.js" />
<Content Include="src\js\thirdParty\test\sinon.js" />
<Content Include="src\template\icon\closeIcon_24.svg" />
<Content Include="src\template\icon\deleteIcon_18.svg" />
<Content Include="src\template\icon\menuIcon_24.svg" />
<Content Include="src\template\icon\extraActionsIcon_18.svg" />
<Content Include="src\template\icon\pauseIcon_18.svg" />
<Content Include="src\template\icon\settingsIcon_24.svg" />
<Content Include="src\template\icon\pauseIcon_30.svg" />
<Content Include="src\template\icon\playIcon_18.svg" />
Expand Down Expand Up @@ -273,7 +282,7 @@
<Content Include="src\js\foreground\view\dialog\updateStreamusDialogView.js" />
<Content Include="src\js\foreground\view\listItemButton\saveSongButtonView.js" />
<Content Include="src\js\foreground\view\appBar\playlistTitleView.js" />
<Content Include="src\js\foreground\view\listItemButton\playSongButtonView.js" />
<Content Include="src\js\foreground\view\listItemButton\playPauseSongButtonView.js" />
<Content Include="src\js\foreground\view\playlist\playlistsAreaView.js" />
<Content Include="src\js\foreground\view\playlist\playlistView.js" />
<Content Include="src\js\foreground\view\contextMenu\contextMenuView.js" />
Expand Down Expand Up @@ -368,6 +377,8 @@
<Content Include="src\template\foregroundArea.html" />
<Content Include="src\template\leftPane\playlistItems.html" />
<Content Include="src\template\listItemButton\addListItemButton.html" />
<Content Include="src\template\listItemButton\extraActionsListItemButton.html" />
<Content Include="src\template\listItemButton\playPauseSongButton.html" />
<Content Include="src\template\playlist\playlists.html" />
<Content Include="src\template\dialog\browserSettings.html" />
<Content Include="src\template\dialog\exportPlaylist.html" />
Expand Down Expand Up @@ -448,6 +459,7 @@
<Content Include="src\_locales\cs\messages.json" />
<Content Include="src\_locales\ko\messages.json" />
<Content Include="src\_locales\ro\messages.json" />
<Content Include="src\_locales\pt_BR\messages.json" />
</ItemGroup>
<ItemGroup>
<Content Include="src\manifest.json" />
Expand Down
12 changes: 12 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
v0.172
======

- Refactored Gruntfile.js completely so that it is much more concise and elegant.
- Removed the references to 'localhost' in manifest.json. Server now supports CORS requests and expects the Streamus' extension ID.
- Updated locales for several languages.
- Enforcing tighter code quality across the entire extension based on analysis of popular GitHub repository coding standards.
- Removed two required permissions for injecting JavaScript into Streamus' website. Instead, Streamus will respond to messages from the website.
- Sharing playlists no longer occurs on share.streamus.com. Instead, it can be found at streamus.com/share
- Removed some legacy code for handling older style of user stored in localStorage
- Tightened linting for LESS and JSHint

v0.169
======

Expand Down

0 comments on commit efb0d42

Please sign in to comment.