Git Product home page Git Product logo

streamuschromeextension's Introduction

Streamus

The most popular Chrome extension YouTube video player.

Overview

This is the repository for Streamus the browser extension. The source for Streamus' server and website are located in their own, respective repositories.

Streamus is currently supported on all derivatives of WebKit such as Chrome, Opera, Slimjet, and Iron. Additionally, it will support Edge once stable.

It can be installed through the Chrome Web Store, the Opera Web Store, or from the Streamus website

Development

Start by cloning the development branch. All PRs should be submitted to the development branch.

Dependencies

You will need to have [Node](https://nodejs.org/), [Grunt](http://gruntjs.com/), and [jspm](http://jspm.io/) installed on your system. After installing Node, navigate using a terminal to the directory in which you cloned Streamus. Then, perform the following command to install dependencies:

npm install jspm install

Compiling code

Streamus' CSS is compiled via [LESS](http://lesscss.org/) and much of it's JavaScript is transpiled via [Babel](https://babeljs.io/). Run the following command from your terminal to build a usable version of Streamus:

grunt compile

This command will parse all currently existing .less files and transform them into .css. Then, it will compile all ES6 JavaScript files into their equivalent ES5 syntax. Then, it will begin to watch for modifications to those files and automatically re-compiled as needed. All compiled files go into the /compiled directory.

API keys

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. Copy `youTubeAPIKey.js.example`, rename it to `youTubeAPIKey.js` and replace the example API key with your own. Production keys are not committed to GitHub. The example key provided should not be relied upon for anything other than testing and it may be revoked without warning. You are strongly encouraged to generate your own key.

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 [/js/background/application.js](https://github.com/MeoMix/StreamusChromeExtension/blob/Development/src/js/background/application.js).

Loading the extension

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/compiled** (Note: this directory won't exist by default. See Compiling code for more details)

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. Alternatively, tests may be ran through grunt via `grunt test`

Libraries

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.

Core

* [jQuery](http://jquery.com/) * [Backbone](http://backbonejs.org/) * [Marionette](http://marionettejs.com) * [lodash](http://lodash.com/) * [jspm](http://jspm.io//) * [SystemJS](https://github.com/systemjs/systemjs) * [Babel](https://babeljs.io/) * [Grunt](http://gruntjs.com/) * [Handlebars](http://handlebarsjs.com/)

Non-core

* [Backbone LocalStorage](https://github.com/jeromegn/Backbone.localStorage) * [Backbone Cocktail](https://github.com/onsi/cocktail) * [jQuery UI](http://jqueryui.com/)

Testing

* [Mocha](http://mochajs.org/) * [Chai](http://chaijs.com/) * [Sinon](http://sinonjs.org/)

Authors

with translation support provided by a community of volunteers.

streamuschromeextension's People

Contributors

azlekov avatar brunomonteiro3 avatar c0b41 avatar cgalvan avatar gitter-badger avatar gosteev avatar jcme avatar jonnyburger avatar josman76 avatar magentah avatar meomix avatar miracleblue avatar mjrev avatar mortonfox avatar rajit avatar rhubarbselleven avatar rmorrin avatar shmup avatar thiago avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streamuschromeextension's Issues

Changing to a video which does not allow embedding causes player issues.

The video I tried changing to is : http://youtu.be/KmcPeuf5aXo
This video was taken down due to copyright and returns that embedding is disabled. This may be a different video state than one that is available but does not allow embedding.

Issues that occur :
Play button changes to loading and remains spinning.
Previous song does not unload, but keeps playing until buffer is exhausted.
Song Title changes but previous song continues playing.
Current progress bar is updated to new videos duration, but still controls previous playing video.

It appears that the player isn't fully unloading the previous song on embed error.

Support logging into YouTube

This feature is requested a lot. Need to support logging into a YouTube account to access private videos, channels, etc.

Fix multi-pc data syncing

So this has been a long-time existing issue. I fully understand the problem and I think I've got a decent solution, I will explain:

If Streamus is logged in on two PCs (imagine two laptops next to each other), the same user can be logged in on both machines. However, the UI doesn't automatically refresh when data is changed on another PC. This can lead to odd data loss issues / perceived data loss issues when moving between PCs.

I think a good fix for this is to monitor the idle state of each PC and also keeps track of an 'isDirty' flag. Whenever a change happens on one PC -- the isDirty flag is set to true and written to chrome.storage.sync. Whenever a PC comes out of idle state, it reads the isDirty flag. If it is set to true, re-request all data from the server. This might take a second to do, but I think this is the only way.

Open to other ideas though!

Need to implement a versioned API system to gracefully support upgrading.

How do you handle rolling out updates to Google Chrome? I often experience an issue where I make a change to my backend which breaks the extension. So, I roll out an update to the server as well as to my extension. There is now a ~30 minute window where my server is up-to-date, but not everyone's extension is on the same version. This causes people to have a negative experience during that window. Is the only solution to this implementing a versioned API and somehow accomodating the different versions with my backend?

A versioned API isn't the only solution, but it's the best solution. There's simply no forcing people to update on your schedule. It's even worse once you support Firefox, because AMO reviews take for-freaking-ever, and they're WAY more likely to reject your extension (they're thorough and picky, I'm not saying anything bad about them - if anything it's a compliment!)...

Remember that some chrome users may have turned off auto-updating of extensions, too...

If you can, you definitely should go with a versioned API.

The next-best solution would be to find a way to make API changes that aren't breaking, but not knowing the internals of your code, it's hard for me to give specific suggestions / criticism there.

http://stackoverflow.com/questions/10592078/implementing-versioning-a-restful-api-with-wcf-or-asp-net-web-api/10599004#comment13910301_10599004

Support Beatport scraping.

A lot of people use Beatport to get their daily dose of new music.

It's pretty simple to scrape Beatport's website for the Top 100 of various genres of music. It's also simple to find the songs on YouTube.

It would be really nice to have automatically updating, top 100 genre lists derived from Beatport's information. The playlists could be completely readonly and just sync with Beatport once a day or something.

Show video buffer progress

The video buffer amount will be shown in the same fashion as YouTube. Overlay a progress bar onto the current time slider. This will allow for pausing the song during buffering, too, because the play/pause button will not be in charge of showing that state.

This will be more practical once new UI changes are implemented. The current time slider will be wider and easier to convey this information.

Include songs in user's collection within search results

Currently, when a user searches, they are presented a single list of items which are results from YouTube's API. It would be better if search would also present results from within the user's collection of songs.

I believe that the best way to do this would be similar to how Google Inbox presents data with their search. Here's an example:

image

Here, we see search results split into two cards (http://www.google.com/design/spec/components/cards.html). I think something similar could be done for splitting between the user's collection and online resources.

Some concerns I have are:

  • What should the maximum height of each card be?
  • What order should the cards appear?
  • It would be frustrating if the user is attempting to search YouTube, but their query is matching too many songs in their collection to easily see the YouTube card.
  • How will we present to the user which playlist contains a given song?
  • If multiple playlists contain the same song - should duplicates be shown? Or perhaps a tag should be used to indicate that the song exists in multiple playlists?
  • Once SoundCloud is supported - should all API results be shown in the same card? Or, should they be split into separate cards?
  • If all APIs are to be shown in the same card - how should ordering be handled?
  • Do we want to support filtering out given APIs or searching only playlists vs APIs? Or simply convey that information via tags and not allow filtering?

Inject 'Play in Stream' icon onto YouTube videos

When you hover over a video on the YouTube page -- a little bar rises up from the bottom of the video. This is a great spot to target for injecting HTML. It would be nice to inject a Streamus icon there and allow users to immediately play in Streamus with one click.

Support importing music libraries from PCs into Streamus

There's no reason Streamus can't be pointed to someones existing music collection, parse it and import all found YouTube videos into Streamus playlists. I think this would really help adoption of Streamus -- getting peoples current music collections into Streamus is important.

Continue with Beatport integration

It's a nice start with Top 10 and Top 100 track support.

Would like to have a drop down menu with stuff like 'Add Video to Playlist' etc.. for each of the buttons which gets injected.

  • The code itself needs to be heavily optimized, IMO. It currently injects a full bootstrap.min and other files. Realistically I think injects should be written in plain javascript if it at all possible to keep load time minimal.

Improve conveying playback quality / handling playback quality.

Currently, users can set a flag in the options file to indicate what quality of YouTube video they want loaded. There's no visual indicator of this, though.

  • Visual indication of current video's playback quality
  • Improve ability to set default playback quality, options file isn't very obvious.

Sometimes left-list bumps over by 10px

It only happens once and it happens when the scrollbar is being shown, but I am struggling to reproduce it consistently -- I do see it happen pretty often, though.

Radio mode enhancements

Streamus' radio mode is based off of streamItems.js's _getRelatedSongs method. The functionality is provided through a few steps:

  • Song is added to streamItems.
  • Query YouTube's API for small subset of related songs.
  • Store all known related songs as a pool. Duplicates are allowed.
  • Pick a related song at random when needed. Duplicates provide weighting.
  • Filter songs which are too long or contain banned keywords such as parody or live

There are numerous quality-of-life improvements which could be made:

  • Repeating a song which already exists in the collection is not desired. However, it is not sufficient to only compare the song's title and ID. Songs may have 'similar' titles. Detecting this and preventing selection of duplicates would be a large improvement. See #173 for more information regarding the needed algorithm.
  • Users would like the ability to filter song selections, i.e. "ban/thumbs down" a given track, artist, or keyword. The issue is made more complex because the 'stream' of music is a temporary sandbox (compared to 'permanent' playlists). It's reasonable to expect 'bans/thumbs down' to be persisted over time. It's unclear whether this should be handled globally, or assignable to a given playlist.
  • Show preview of next songs to be played. The previewed songs would be faded out and somewhat non-interactive. The previews would change as new songs are added/remove from the stream and as songs are banned/filtered.

Additionally, how should the _getRelatedSongs method be modified so that it doesn't fail silently when YouTube's API has not yet responded with related songs?

Can't add video to Stream

I added a shared playlist from a friend
Then I added the playlist to the stream via right click
Then I tried to add a new video to my playlist and then add it to my stream -- wouldn't add to the stream until stream clear.

Add controls to Full Screen videos

Since video is just an HTML5 canvas there are no controls when in full screen. Need to add an overlay to the fullscreen view to show some controls.

Show current time tooltip

A tooltip should be displayed when hovering over the time slider. This will allow the user to know what time they will arrive at before clicking on that point in time. YouTube has this feature and it's poor UX for it to be missing from Streamus.

It's possible that this should be implemented after #524's modifications to sliders. The slider's UI will be changing when becoming more material.

Support bookmark importing.

The overall concept for this is pretty simple... allow users to drag-and-drop a bookmark folder and import all YouTube videos in that folder.

The specifics are a bit trickier, though. What if there are nested bookmarked folders? Does it all go into one playlist? Multiple playlists?

Still, would be nice.

Support SoundCloud's API

This is probably a huge undertaking, but a lot of users wish YouTube + SoundCloud were supported. Since other websites, like plug.dj, support SoundCloud -- I suspect it is quite possible.

I'm not sure if radio mode would work with SoundCloud -- a lot of the logic for smart picking related YouTube videos is given by YouTube's API. If SoundCloud doesn't have something similar... it won't be possible!

Connection issues cause Streamus to play 2 videos at once

From a user report -- "What happend was, I was playing one song, and had some internet issues. When my connection recovered, it was playing the song, twice, and the same time. I could pause them both, but when I hit play, they both played."

Improve UI response during lag / connectivity issues

If it takes a while to get data from YouTube, Streamus doesn't look very good. I would expect the area for a new song to be showing up to be pre-filled in with a "Fetching from YouTube..." indicator. Then if it fails I would have a location to show it failed and if it succeeds I drop the video in that spot.

There's a loading spinner, but really doesn't do much.

Automatic refresh of imported YouTube playlists

Users are able to import YouTube playlists into Streamus. They have an expectation that an imported playlist will automatically update when new songs are added to it on YouTube.

In order to do this, several things need to happen:

  • The Playlist object needs another property -- 'import URL'. It might also need an 'import source' if we expect to need to update from SoundCloud vs YouTube.
  • This property will need to be persisted to the database.
  • The playlist will need a means of diffing its current state with the playlist known to YouTube.
  • It should be able to automatically refresh on a time interval, but we must be careful not to flood with requests by staggering the interval. That is, if there are 100 imported playlists they should not all attempt to update at 12:00 PM.
  • Perhaps the auto-update time should be configurable by the end user.
  • The user should be able to trigger the update manually.
  • Auto-updating should try its best to not restore songs which have been deleted by the user.
  • (Bonus points) Show a badge on Streamus' icon indicating that the user has new songs to listen to. This would be similar to Facebook's new IM badge.

Add upvote/downvote support for playlists

I'm not sure of the specifics on this, but maybe:

  • Create a music sub-reddit or create a bot to parse pre-existing subreddits.
  • Allow users to submit Playlists
  • Parse playlists / represent which ones are best by upvote.

There's gotta be more to it than that, but I've been asked for this feature a few times at this point.

Crop song to specific start time

YouTube videos are notorious for having blank minutes at the end of videos or garbage noise at the start / introductory noise for channels.

It would be nice to allow users to indicate that they wish to 'trim' a song at a current point in time. This would mean that the song would start at the 'start trimmed' time and consider itself done when it hits an 'end trim' time, skipping to the next song at that point.

There's no UI support for this currently nor any server-side support. Need to add 'start trim time' and 'end trim time' values to PlaylistItems.

The trim points in time might be represented as markers on the YouTube elapsed time progress bar. The user would be able to click-to-add-or-remove a marker. The markers would be draggable.

Social sharing

So a user should be able to click an icon called 'Broadcast' which will then allow them to be able to take 'Subscribers.' Unselecting broadcasting will disconnect the subscribers with a notification message.

While the broadcaster has subscribers, its state will be broadcasted to the others. They will have a new Stream called 'BroadcasterName' which will contain playlists the broadcaster creates. The broadcaster will not be able to change Streams while broadcasting.

The listeners will get all the videos the Broadcaster listens to while they listen (same for playlists). Playlists will be under a stream titled the broadcaster's name, and the stream will have playlists containing the various playlists created by the broadcaster. Those playlists will have the corresponding items.

Add the ability to 'Share on Facebook'

It would be nice to incorporate a bit of social media into Streamus. I see a lot of stuff on Facebook about 'What I'm currently listening to' on Spotify / Pandora, etc..

It would be nice to be able to easily post your current video on Facebook. Perhaps a right click -> share on a stream item.

Show a loading icon when saving a large stream as a playlist

The server takes a second to respond and there is no visual indication that a save is occurring. Probably create a mock playlist area with a loading icon and then fill it in with actual playlist information once the server has responded.

loadVideoByID with time specified does nothing

For some reason when I called loadVideoById and specific a time in seconds to start -- the video starts at 0. This is probably due to my hack/workaround, but I need to sit down and figure it out!

Add an option to watch on YouTube from Streamus

Streamus should play nicely with YouTube and not try to be the de-facto end-all source. People still want the ability to go check things out on YouTube. It makes sense to add a rightclick -> watch on YouTube option to videos.

Should VideoSearchResults fade in or slide in?

Currently, VideoSearchResults fades in when the '+ Add Videos' button is clicked.

This looks fine... but it's the only element in Streamus which fades in instead of sliding in. Would it make more sense to have this element slide in from the left hand side?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.