zen-audio-player / zen-audio-player.github.io Goto Github PK
View Code? Open in Web Editor NEWListen to YouTube videos, without the distracting visuals.
Home Page: https://zen-audio-player.github.io/
License: MIT License
Listen to YouTube videos, without the distracting visuals.
Home Page: https://zen-audio-player.github.io/
License: MIT License
The next tests need to be sending many different URL forms & user behaviors validating the JS object player which represents the YouTube player object that gets embedded and determine if the video is playing, also lots of error checking tests.
Try to log GA events for errors, video titles, sizes, channels, categories, etc.
Is it possible to dynamically change the tweet based on the YouTube video? The default message can be as is
ie: I'm listening to XYZ on #ZenAudioPlayer
Don't want to clump data with my personal domain
They're willing to sponsor us since we're open source.
bower install --save trackjs
)The extension is open source, just need to fork and make a PR. Can probably reuse the youtube script here: https://github.com/david-sabata/web-scrobbler/blob/947f46bb4e8155ed0f65c8a8c82f28c879286e91/connectors/v2/youtube.js
Also need to update this list: https://github.com/david-sabata/web-scrobbler/blob/947f46bb4e8155ed0f65c8a8c82f28c879286e91/core/connectors.js
Should make a new repo... Based off of the youtube one: https://gist.github.com/shakeelmohamed/46d1d2bcbcb8adcc8171
Then reopen #11
Our current logo is... well it's just text and that's not an ideal logo, especially as a favicon.
I may do this myself, but I'm posting for visibility ๐
We need this for BrowserStack before we can use them
Requirements:
Current known matrix:
Just need to retrieve results from the API, and hide any images - then make the links do some cool redirection to Zen Audio Player by passing the YouTube video URL as a querystring parameter.
We basically have 0 docs right now, a wiki would be nice ๐
Maybe we even make a separate repo just for docs? Then we can have zen-audio-player.github.io/docs be a valid URL
If the demo link fails, meaning there's a problem with JS/YouTube's API, the URL ends up looking like http://zen-audio-player.github.io/?v=koJv-j1usoI?v=koJv-j1usoI or something really strange. Just need to do a simple indexOf() check somewhere - or improve error handling.. maybe needs a giant try/catch somewhere
Have it ready w/ a prepopulated tweet and #ZenAudioPlayer
When/if this happens:
Some discussion on how to do this, it's not going to be just JS though http://stackoverflow.com/questions/12672480/capture-mac-media-control-keys-in-a-chrome-extension
for sharing
Since the logo no longer says "Zen Audio Player" we need to add that text as a header under the logo.
The code for this is basically what was removed from index.html
with 48ca66b
If we add hyperlinks to any URLs in the video description the experience will be much better.
The links should follow the form: <a href="http://example.com" target="_blank">
so the link opens in a new window/tab.
Can be a really concise statement, but needs to be in the splash page
TODO:
Major bugs on Android
OS:
Windows 10 Professional
Browsers affected:
Chrome, Firefox (all that I tested)
How to repro:
Method 1
Method 2
Expected behaviour:
Pause button to be displayed and function correctly on page load when a video id has already been provided.
Displayed behaviour:
Video will start playing but the controls will still show the play button. - In Firefox hitting play/pause a couple times with get the button into the correct state. In Chrome nothing happens, this may be to do with the console errors about XSS that are coming through though..
Currently, if the query is xyz
it will be redirected to http://zen-audio-player.github.io/?v=%20%20%20xyz
which tries to parse %20%20%20xyz
as the video ID, which is invalid.
This is using firefox 38.0.
JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead ScriptSurrogate.js:345:209
ReferenceError: $ is not defined everything.js:153:0
ReferenceError: ga is not defined everything.js:138:12
Using Microsoft Edge, the demo link doesn't do anything. The URL clearly changes, but it just dies (could be a race condition with jQuery loading before the YouTube API). There are no JavaScript console errors.
edit: Non-Windows users can get free VMs from Microsoft's website! https://dev.windows.com/en-us/microsoft-edge/tools/vms/
The mini-player controls are no longer visible. The proper fix is implementing all of the buttons/controls using HTML buttons, then hide the video player entirely. Doing this would probably fix #5 also
Might need to pull in icons for play/pause/stop/etc buttons from another place since primer's are limited, font awesome should suffice
YouTube has a very aggressive iOS API, it forces the player to full screen mode!:
In Safari on OS X, the play/pause button doesn't update when playing
It might just be a race condition introduced by a3ec13f:
Browserstack is an awesome browser testing service, and they're free for open source projects!
The only way to seek currently is to show the player and do it there. We already have a great slider for volume, we can steal most of that logic for this
A #
in the URL breaks all functionality.
Repro:
http://zen-audio-player.github.io/#
)http://zen-audio-player.github.io/#?v=koJv-j1usoI
but nothing will happen๐
There's some strange environment issues on Windows that require C++ compilers for the native compilation of the zombie dependency....
So, I think the best solution is to switch to PhantomJS, there's a mocha test runner that should be helpful also
gh-pages
branch: https://github.com/zen-audio-player/statsI've built a really nice GA dashboard, it would be really cool to show these stats publicly via keen.io.
LICENSE
file has my name where it should say "Zen Audio Player".Created by @_Shakeel
line from the website? If yes, can we embed some kind of automatically updated list of contributors?The lib is at http://primercss.io/
Can probably show it in a collapsed div, just like youtube does beneath the video. It probably need to be eval'd as HTML
This becomes significantly more useful with a CLI, which will need to become it's own repository...
Ex: zenyoutube https://youtube.com/...
The tricky part is escaping slashes... maybe try quoted URLs
Ex:
open http://shakeelmohamed.com/zen-youtube-audio-player/?v=https://www.youtube.com/watch?v=koJv-j1usoI
Example of what works on OS X - at least with oh-my-zsh, the URL is automatically decoded when pasted:
open http://shakeelmohamed.com/zen-youtube-audio-player/\?v\=https://www.youtube.com/watch\?v\=koJv-j1usoI
maybe just make a node package
Need to do several things for the chrome extension.
See this milestone for details: https://github.com/shakeelmohamed/zen-youtube-chrome/milestones/Gotta%20get%20these%20things%20done
When a video finishes, the play/pause button should return to play, then when play/pause is clicked it should restart the video.
Just like #72 - but blocked on #26
Grab the logo from here: https://keen.io/blog/43496487388/identity-crisis-an-evolution-of-our-brand
Things to investigate:
It sucks when you reload the page and the video/song starts over from the beginning. We can do this a few different ways: URL, cookies, or the super awesome HTML5 local storage API.
edit:
An implementation might look something like the following, but with functions doing the 2 tasks:
window.sessionStorage
player.seekTo()
diff --git a/js/everything.js b/js/everything.js
index e273a1a..eedc2ab 100644
--- a/js/everything.js
+++ b/js/everything.js
@@ -173,6 +173,15 @@ function updatePlayerTime() {
$("#currentTime").text(cleanTime(player.getCurrentTime()));
// TODO: after the video loads, player.getDuration() may have changed +/- 1
$("#totalTime").text(cleanTime(player.getDuration()));
+
+ /**
+ * Store the current video's time, every 100ms as defined by
+ * by the setInterval() timer in onPlayerReady().
+ */
+ var videoID = getCurrentVideoID();
+ if (window.sessionStorage && videoID) {
+ window.sessionStorage[videoID] = player.getCurrentTime();
+ }
}
// Lock for updating the volume
@@ -342,6 +351,11 @@ $(function() {
if (currentVideoID) {
$("#v").attr("value", currentVideoID);
getVideoDescription(currentVideoID);
+
+ if (window.sessionStorage && window.sessionStorage.hasOwnProperty(currentVideoID)) {
+ // TODO: verify that window.sessionStorage[currentVideoID] is an integer, else noop
+ player.seekTo(window.sessionStorage[currentVideoID]);
+ }
}
// Hide the demo link if playing the demo video's audio
The current timeout of 1 second makes the button seem unresponsive. And if you click the button during the timeout, the click won't be registered.
We can either experiment with setting the timeout lower or implement some logic to switch between the play and pause button some other way (using setInterval and PlayerState?) .
The logo is ironically too large & distracting in the readme
I've been thinking about how we can implement Soundcloud support as seamlessly as possible. @monicacheung did a ton of great work in getting this process started, but I think the next step is breaking out Soundcloud support into it's own repo.
wrapParseVideoID()
in zap-common.js
)Options for both playlists, and single tracks would be cool.
parseYoutubeVideoID()
to have an else if condition for soundcloud URLSparseYoutubeVideoID()
to something more generic, and updated all uses of the function.https://zen-audio-player.github.io/?v=https%3A%2F%2Fsoundcloud.com%2Fuser%2Ftrack
)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.