Giter Site home page Giter Site logo

beardedspice's Introduction

travis-ci

Before everything

Read this conversation: #899

Common Issues

It's asked that anyone with an issue check the Wiki Section before posting a new issue.

Users Guide

BeardedSpice

What?

BeardedSpice allows you to control web based media players (Like SoundCloud, and YouTube ... List of supported sites to date) and some native apps with the media keys found on Mac keyboards.

How?

All you need to do is just open your favorite supported media site in either Chrome or Safari, then click on BeardedSpice's Menubar icon and select the website you want to control using your media keys.

Interested in doing it with a keyboard-shortcut?

We've got you covered, give the Shortcuts section a look below!

Install

Ready to give BeardedSpice a spin? You can download the latest release here*, or find a full list of all our previously released binaries here.

*Mac OS X 10.10 or greater required.

If you're using Safari (≥9.1.1), you should enable developer preference. See detailed guide how to do it.

Features

Smart Mode

This feature is a work-in-progress, we are currently working on bringing it to all our supported sites!

BeardedSpice tries to automatically guess which tab it should control for you. When you press any media key or BeardedSpice shortcut with BeardedSpice open, it will automatically control the site currently playing media, if you have no playing sites, it will try to control the currently focused tab (if it is one of our supported sites) if BeardedSpice failed to do either, it will automatically control the first.

Automatic Updates

No more checking for new releases on our website, BeardedSpice will automatically notify you when a new release is available.

Up to Date Media Strategies

First, what is a Media Strategy? This is what we call a template with custom javascript aimed at a specific website, allowing the BeardedSpice program to control it with the media keys.

Second, the Compatibility Updates option allows you to check for added or changed Media Strategies that were contributed since the last official release.

You can also exchange strategies between users in the form of files with the extension bsstrategy. In the application Preferences, in the Controllers section there are corresponding Export/Import buttons. There is a repository with untested strategies.

Keyboard Shortcuts

BeardedSpice comes with a handy list of Keyboard Shortcuts that can be configured under the Shortcuts tab of BeardedSpice Preferences (available through the menubar icon). Here is a table of Default Keyboard Shortcuts:

Default Shortcut Action
+ F8 Set Focused Browser tab as Active Player (effectively directing your commands to that tab)
+ F6 Focus Active Player (Shows the tab currently controlled by BeardedSpice)
+ F10 Toggle Favorite (Add currently playing track to your favorites on it's site)
+ F11 Show Track information (shows a notification with info about the currently playing tab)

Multimedia keys of non-Apple keyboards

Using a 3rd-party keyboard? Or even a keyboard with no multimedia keys? No problems, BeardedSpice allows you to set your multimedia keys under the shortcuts tab, so you can use any key (or key combination) of your liking.

Disabling certain handlers

From the preferences tab, uncheck any types of webpages that you don't want BeardedSpice to have control over. By default, all implemented handlers are enabled.

Supported Mac OS X applications

Supported Browsers

Supported Sites

Don't see your favorite site in the list ?

No Problem, Just submit an issue.

Want to Contribute?

Please do! Contributions are the lifeblood of the project, and yours helps keep us moving forward.

If you just want to add a new website to the list above, checkout the app support request list. The Developer How-To Guide has the information needed to get started (and don't be afraid to ask questions!). Websites only need some (easily learned) knowledge of javascript and maybe webpage delving with devtool (also Chrome's official documentation).

Integrating a new native app (aka Chrome, Firefox, Spotify) in BeardedSpice is a little more complicated and requires NO objective-c experience. Many good examples exist. However, some apps simply aren't compatible at this time. See the wiki article on getting started importing a Native app.

Unsupported BeardedSpice Strategies

Unsupported BeardedSpice Strategies repository

beardedspice's People

Contributors

ahanriat avatar andrewslotin avatar anthonywhitakerjr avatar askedrelic avatar bretmartin avatar breyten avatar coder-256 avatar conarro avatar davarisg avatar egoberdon avatar febbraro avatar fmborghino avatar foozee avatar frdmn avatar gapurov avatar geexican avatar jayrhynas avatar jhuebsch avatar jmcouillard avatar josefalcon avatar kureb avatar markreid avatar okcoker avatar ploddi avatar pnamu avatar ponomarevlm avatar stillness-2 avatar tanmaysachan avatar trhodeos avatar vitorgalvao 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

beardedspice's Issues

Add Songza App Support

Support for Songza.com

Tried doing this myself, but not sophisticated enough to write the strategies for it

Play/Pause key not working

Running Mavericks 10.9.1 Retina Macbook Pro 1st Gen.

Forward and backwards keys are working fine but the play/pause key doesn't work at all.

Open to off-the-beat-in-path services?

Hey, first off thanks for releasing this! I was wondering if you were open to including strategies for lesser known sitesif I wrote them.

Namely, I started a music start-up called Spotlight.fm and would love to support this, even just for my personal use (and our users' use).

If we're too small (20K users) right now, I understand. Otherwise, I'd love to hack on this!

Add HID device support, i.e. for iPod certified headphones with cable remote

Normal Apple (or iPod certified) wired headphone with inline cable remotes allow you to control iTunes under OS X.

These headphones use the microphone pin of the headphone port and some resistors to transmit the button presses to the device that is to be controlled.

Luckly, under OS X, the inline cable remote is exposed to the system as a USB HID device called "Apple Mikey HID Driver": https://stackoverflow.com/questions/15398237/detect-hardware-headphone-presses-in-mac

It would be nice if the supported for them could be added to bearded spice.

Support FluidApp

Fluidapp (see fluidapp.com) is a small app that turns web apps into desktop apps by letting you open web pages as though they were native apps. Is it possible for Beardedspice to monitor fluid apps as well?

Back and Forward not working on Spotify web

I can play/pause fine with spotify web, but the forward and back buttons don't seem to work.

Using a Logitech K750 like the other issue, and again these keys work fine with the inbuilt keyboard so I'm sure it is probably something you can't fix, but I thought I'd ask!

App Support - Pocket Casts

Pocket Casts recently opened their web app at play.pocketcasts.com, and it'd be great if I could control it with my media keys.

Support for bop.fm

It would be awesome to see support for bop.fm, which allows you to have a playlist that spans many streaming sites, such as youtube, pandora, spotify, etc...

+ (id)initWithApplication:andWindow:andTab: method wrong behaviour

On my OSX 10.9.2 methods [SafariTab get] and [SafariWindow get] return nil.

And then on AppDelegate's method mediaKeyTap:receivedMediaKeyEvent: you call

MediaStrategy *strategy = [mediaStrategyRegistry getMediaStrategyForTab:activeTab];

which also returns nil because URL property for activeTab is also nil.

As result app doesn't send any messages to safari tabs.

Add option to Launch at Login

Would be great to make this auto launch, I often forget that it isn't launched and press media keys, launching iTunes

Auto-assign if single tab on launch

When a single compatible tab is found it would great if the app could automatically activate that source.

Apologies if this is a duplicate request. I noticed #67, which aims for similar functionality.

App support: 8tracks

Hi, 8tracks.com is an excellent internet radio site, I'd love support for it!

Stops working after sleep

It stops recognising the media keys after the computer has slept and woke up.

Mavericks OS X 10.9.1
BeardedSpice 0.1.0

Add support for Chrome Canary

I think the only info you need is the CFBundleIdentifier, which is "com.google.Chrome.canary", but I have no idea how to add that properly to AppDelegate.m…

Doesn't work with Safari – SafariTabAdapter initializes with null tab

Hello, I've just found beardedspice and it looks great, but I cannot make it work with Safari (and Rdio). After some digging I found that problem is in SafariTabAdapter.m, where SafariTab initializes with null. Problem is in [tab get] call because it always returns null. When I replace it with just tab, it works like a charm:

diff --git a/BeardedSpice/SafariTabAdapter.m b/BeardedSpice/SafariTabAdapter.m
index 84d87ee..76cd329 100644
--- a/BeardedSpice/SafariTabAdapter.m
+++ b/BeardedSpice/SafariTabAdapter.m
@@ -13,7 +13,7 @@
 + (id)initWithApplication:(SafariApplication *)application andWindow:(SafariWindow *)window andTab:(SafariTab *)tab
 {
     SafariTabAdapter *out = [[SafariTabAdapter alloc] init];
-    [out setTab:[tab get]];
+    [out setTab:tab];
     [out setWindow:[window get]];
     [out setApplication:application];
     return out;

I run beardedspice on OS X Mavericks 10.9.3 with Safari 7.0.4 (9537.76.4).

Does not seem to work with Logitech K750 keyboard

Does this only work with the Apple Keyboard? It works fine at work with the Apple Bluetooth keyboard, but I can't get any controls to work at home with the Logitech Keyboard. I also have an old Microsoft Keyboard, with which I can use play/pause, but I can't switch tracks using Google Play.

Thanks!

Crashes on Yosemite

Console lists the following when clicking on anything in the menu after launching and the app crashes:

22/07/2014 19:30:03.259 ReportCrash[55978]: Failed to create CSSymbolicatorRef for BeardedSpice[55995]
22/07/2014 19:30:03.740 ReportCrash[55978]: Failed to create dSYM-less CSSymbolicatorRef for BeardedSpice[55995]

[app-support] Spotify (Native)

It'd be nice if we could still be able to use native apps like Spotify and just switch using beardedspice. I think we could use AppleScript or something, but I don't do enough OSX work to know.

Could that work?

Also see #95.

Smart Mode

In Smart mode, you don't need to manage which tabs to control, It Just Works ™
The algorithm would be something like this:

When a media key is pressed:
    Iterate over all tabs and get the ones which are playing
    if a single tab is playing:
        Apply the media key to it
        Save it as the activeTab
    if no tab is playing and the pressed key is "play":
        start playing the activeTab
        if there is no activeTab
            start playing the tab with focus
    if multiples tabs are playing:
        Apply the media key to all of them
        save the one which has focus as the activeTab

This would require an extra function in the handlers to check if the webpage is playing, but would allow the media keys to be used in most situations without having to remember to press a shortcut to set the active tab...

Would something like this be possible in practice?

BeardedSpice no longer "works" after having opened another mediakeys-activated application

I have some issues where BeardedSpice stops recognising mediakeys "randomly". After some amount of testing and figuring out, I finally found a way to reproduce the issue. Here it is:

  • Start Chrome

Note that I already had some tabs opened with some unrelated websites that don't have sound playing capabilities. I added a new browser tab for my audio source.

  • Start playing a YT video and have it remain active
  • Start BeardedSpice

BeardedSpice knows which video is playing correctly, but media keys don't work.

  • With the YT video tab active, press the "Set Active Tab" shortcut

Media keys now work properly.

  • Start VLC Player or iTunes

Media keys are now assigned to VLC or iTunes

  • Quit VLC Player or iTunes

BeardedSpice still knows which video is playing, but media keys are ignored and iTunes does not start either when Play is pressed. Additionally, using the "Set Active Tab" shortcut on the YT video tab doesn't make any difference: Media keys are still ignored completely.

  • Quit BeardedSpice

Mediakeys still don't start iTunes.

  • Start BeardedSpice

BeardedSpice knows which video is playing correctly, but media keys don't work.

  • With the YT video tab active, press the "Set Active Tab" shortcut

BeardedSpice is now working properly again.

I find there are multiple things wrong here. I think BeardedSpice should work "instantly" with the first (or any) applicable browser tab without having to "activate" it first. Additionally, I don't get why iTunes doesn't start with the "play" key anymore after I closed BeardedSpice.

Crash: EXC_BAD_ACCESS (SIGSEGV)

When I try and select a tab from the dropdown menu the app crashes.

Crash report:

Process:               BeardedSpice [48960]
Path:                  /Applications/BeardedSpice.app/Contents/MacOS/BeardedSpice
Identifier:            com.beardedspice.BeardedSpice
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           BeardedSpice [48960]
User ID:               501

Date/Time:             2014-06-20 19:02:41.268 -0700
OS Version:            Mac OS X 10.10 (14A261i)
Report Version:        11
Anonymous UUID:        6A5C5467-C2A1-0730-167B-D5E8B18EDBD3

Sleep/Wake UUID:       826859DA-2C20-4B91-BE74-8A3896DCD574

Time Awake Since Boot: 32000 seconds
Time Since Wake:       9600 seconds

Crashed Thread:        Unknown

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000098

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x00007fff5fbfd804  rdx: 0x00007fff5fbfd968
  rdi: 0x00007fff5fbfd968  rsi: 0x0000000000000000  rbp: 0x00007fff5fbfd9a0  rsp: 0x00007fff5fbfd910
   r8: 0x0000000000000014   r9: 0xffffffffffffffec  r10: 0x00007fff5fbfd964  r11: 0x00007fff5fbfd808
  r12: 0x00007fff746b1244  r13: 0x0000000100b1de60  r14: 0x00007fff70000000  r15: 0x0000000000000000
  rip: 0x00007fff8a2644d8  rfl: 0x0000000000010246  cr2: 0x0000000000000098

Logical CPU:     0
Error Code:      0x00000004
Trap Number:     14


Binary images description not available


External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 18484
    thread_create: 0
    thread_set_state: 0

I also continually see "BeardedSpice[48960]: AppleEvents: Send port for process has no send right, port=( port:35139/0x8943 rcv:1,send:0,d:0 limit:5) (findOrCreate()/AEMachUtils.cp #526) com.apple.main-thread" in the logs.

Need an app icon

I made this icon to use for myself. Thought I'd share... :) Image is copy-righted by "artistically" manipulated enough, plus obviously a satire, that it should be safe to include as the default app icon if desired.
beardedspiceicon

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.