Hacker News new | past | comments | ask | show | jobs | submit login
YouTube adds Play icon to page titles so you can see which tabs are making noise (thenextweb.com)
178 points by Lightning on Aug 3, 2013 | hide | past | favorite | 67 comments



Funny timing. I noticed this first after I updated Chrome and thought it was a part of their new audio indicators feature which might have been a part of the release.

While researching this I discovered that you can see audio indicators right now (even in the stable release) by including "–enable-audible-notifications" in the commandline when running the program.



My understanding is that Chrome wants to roll out this feature, but there is no way to know if various plugins, including flash, are playing audio. If they show an indicator for only html5 A/V it will seem like a half-broken feature.


Chrome has its own "native" flash implementation, maintained by Google; no reason they couldn't add a hook to notify the browser about audio playback.


It isn't native, it's adobe flash player packaged with the browser. They have no more ways of telling it is using audio than a normal plugin.


The "-enable-audible-notifications" is working with flash audio and it is in chrome since months.


This is a simple javascript that adds a unicode "▶" to the beginning of html page title. This can be easily coded using the youtube javascript api. Just add the following code when the youtube playstate changes to "YT.PlayerState.PLAYING".

The js basically looks like this: function onPlayerStateChange(event) { var player = event.target; switch (event.data) { case YT.PlayerState.PLAYING: document.title = '▶' + document.title; break; } }


FYI, if you implement this code for real, you'll need to make sure the symbol doesn't get repeated upon multiple plays and that it gets removed when not playing.

Edit: This is two different bugs. It means that if you are not playing, it will still look like it is playing and if you play multiple times, you will see the symbol get duplicated.

Edit 2: Code should be like this:

var documentTitle = document.title; function onPlayerStateChange(event) { var player = event.target; switch (event.data) { case YT.PlayerState.PLAYING: document.title = '▶' + documentTitle; break; default: document.title = documentTitle } }

but it assumes that the document title doesn't otherwise change.


In practice, the youtube api has other cases in that switch expression (ENDED, PAUSED, etc). For those, you would use the following in their case statement: document.title = document.title.replace("\u25B6","");

And to revise my original code, this is what you could use in the PLAYING statement to prevent multiple play symbols: document.title = "\u25B6" + document.title.replace("\u25B6","");

Notice, too, that I replaced the "▶" with the appropriate javascript encoding.


That's two ways of saying the same thing


Unfortunately it shows as playing by default, which is obviously not true if you have ’Click to Play’ enabled in Chrome (load plugins on demand).


If YouTube didn't hire the best and the brightest they wouldn't how know to copy Soundcloud.


So YouTube shouldn't do it because soundcloud did it first. If they copied soundcloud idea, I am really glad they did as a User.


All he is saying is, it took them long to copy it.


No, all he is saying is a snide remark about Google and its employees -- a completely pointless comment.


No, it's an illustration of how hiring the best and brightest doesn't get you the cutting edge. If anything, hiring the best and brightest prevents those people from creating competitors. In the sense that I describe it, which is the sense in that it apparently didn't occur to YT to indicate a playing tab until now, Google et al are professional sandbaggers.

This feature is straight-up evidence that YT is behind the times. Rationalize away the bureaucracy or inertia or whatever of a company that size all you like, but fact is they're behind the times.

I bet they can write the shit out of a Quicksort on a whiteboard, though.


I feel like this should be part of the browser.


It will be... It was a feature implemented in WebKit like a year ago. http://googlesystem.blogspot.ca/2013/02/chrome-shows-which-t...

It's coming soon I imagine.


deadreturns2: fyi, you are shadowbanned (this means people won't see and won't be able to reply to your comments). Not sure why.


I'm sure there's a reason for it, and that telling people they've been hellbanned negates the whole purpose of said hellbanning.


If PG wants people to respect the Hellban, maybe he could append the reason they were hellbanned to their posts. (Obviously visible only to onlookers.) As it stands the process is opaque.

In the case of the commenter below, 100% of his comments are short, and of them most are valueless or negatively valuable.

https://news.ycombinator.com/item?id=6073870

A particularly poignant example.


I think people who choose to show hellbanned users should just be quiet about it.


I think it’s morally wrong to not make people who post something (that is not some sort of automated spam) that is just ignored aware of their situation.


> In the case of the commenter below, 100% of his comments are short, and of them most are valueless or negatively valuable.

I agree this might have been a poor choice re: this particular user.

> maybe [pg] could append the reason they were hellbanned to their posts. (Obviously visible only to onlookers.) As it stands the process is opaque.

Agree.


People can get banned for automated reasons. If you find yourself banned, pg made a URL https://news.ycombinator.com/unban?ip=ipaddress that will unban you. It only works once. I've been banned twice. The first time (before that URL existed) I appealed to info@ycombinator.com and they said it was a mistake. (The second time I used the URL.)


Call it jury nullification. In a very large number of cases, a look through the person's comment history will offer no obvious reason for the ban.


To be honest I think a browser should shut the tab up if it isn't focussed and when you switch to it there should be an unmute button.

There are so many pop-unders these days which start talking to you it's unreal.

I'm not a victim of these regularly (thanks to adblock edge) but I know many who are.


I don't think that will ever happen; lots of people use background tabs to play music in something like Pandora or Play Music.


They can hit unmute :)

I still use WinAmp. Perhaps I'm getting too old for this :)


> I still use WinAmp

How do you discover new music?

> Perhaps I'm getting too old for this

Aha, I see


>How do you discover new music?

Not him but personally, I still discover music the same way I have for the past 17 years. Music sites, conversation with fans of bands I like, magazines, bandcamp (myspace in the old days), spontaneous purchases of 2nd hand CDs in stores...

Personally, I find automatic recommendation services lacking both in recommendation quality and diversity of things to recommend from.


"Discovering new music" is a massively overblown concept. I discover plenty of new music without going out of my way to do it but if I was trapped on a desert island with my current 40 some gb of music I'd probably be more than content with that for a few decades.


I'd probably be content as well, but I think about some of my all-time favourite songs, and how a lot of them were discovered by chance or through some obscure means. And I wonder just how many more "all-time favourites" are out there waiting to be discovered. That's what keeps me actively listening to new music, and indeed, I have found some truly excellent music through music-recommendation services (last.fm mostly).


Personally, I find automatic recommendation services lacking both in recommendation quality and diversity of things to recommend from.

They work great if you've never heard Rhianna or Maroon 5 before. YouTube has put a lot of work into ensuring that Lady Gaga gets recommended to everybody.


I agree. I scrobble to last.fm and usually just dig around the similar artists area whenever I find new music. Finding IDs of tracks I enjoy on mixes are also another source for my library.


What the fuck is scrobbling?


It's a silly word that last.fm uses to mean streaming metadata of all music you play to them so they can mine it and do all the crunching they do to run their service regardless of what player you use. A scrobbler can also refer to a plugin to some music player application that sends said metadata to last.fm.


Thanks for the explanation. In that case I will stick to winamp and my circa 2000 minidisc player, neither of which puke my playlist over the internet.


"How do you discover new music?"

I ask my friends, I ask the people at my local record store, I read blogs and listen to podcasts. What I don't do is rely on the terrible Amazon style "if you bought this, you might buy that" style of nonsense.

Pandora has the technology, but their catalog is way too limited. I've said this before, but music discovery is a problem that is not obviously amenable to a market-oriented solution.


Pandora has a much larger catalog than your local record store. Pandora is amazing for music discovery, I'd say far better than the hipsters working in amoeba records that are seldom older than Jerry Garcia's guitars.

I used to use your methods, but have discovered far more thanks to pandora and YouTube than I ever did.


I can't say I am impressed with Pandora. Eventually all my Pandora stations just start playing The Cure. The Cure is okay, but not what I was looking from in my "Hall of the mountain king" station...

I think that they suffer from overtraining problems that limit the diversity of their suggestions. They've got a good catalog but, in my experience, are poor at diverse suggestions.


Resurrection records in Camden, London.

No shit music and no fucking hipsters.


The same way I always did: by recommendation of humans and going to gigs. Oh and playing it (I play keyboard, guitar, clarinet and drums).

The world did still turn before everything went all crazy shit "social". Stuff was still found, music was still listened to.


That's a very old feature wish. With <video/> it's possible to implement, but most people are still using the flash player, where, with the current NSAPI it is not very easy to implement it.


Chrome uses the Pepper Flash player now which gives more fine-tuned control over audio. This functionality is likely possible to build now.


Couldn't this have already been done by dynamically changing the favicon using javascript? Or did that not work with all browsers.


No, it works, and other sites have been using this technique for quite a long time. It just never made it into YT product until now.


Safari doesn't display a favicon in the tabs.


This is one thing I like about Safari. When you open a new tab it won't start playing the video until you select it.


I saw this on Canary a few months ago its a pretty nifty feature


I'm curious as to why they took it out, it's a lifesaver when you have 50+ tabs and one of them has a talking ad.


I really don't know why I still have to suffer from unmutable Flash, immediately starting music and videos without any possibility to have it to shut up by default. Just ask me:

This page wants to play audio, would you like to hear it? Yes / No [V] Remember for the next times

The funny thing is that soundcloud and youtube behave very well in this respect. Apparently the biggest audio sites (just look at the amount of music on youtube!) don't need to start blasting without any user interaction.


Click-to-play plugins in browser settings not enough?


I wish there was a way to track who is making noise INSIDE a page.

I have two issues, one is some news websites that autoplay videos on random parts of the page.

The other, more annoying, is video websites (for example to watch fansubbed anime) that have ads that the ad author (not the side) somehow hidden it... Once I even found it, opening the inspector and looking around, but sometimes a page is ridicously complex that it is easy to just close it, and find another site.


How about not autoplaying the video as soon as I open the page? I frequently open multiple pages in background tabs and Youtube makes this rather annoying.


Or it should play only when you switch to the tab.


This is a welcome change. But now my youtube history URLs in awesome bar of FF all have the unicode character of the "play" sign. Can there be a more elegant implementation, and even click to play plugin won't have any effect as this poster notes [1].

[1] - https://news.ycombinator.com/item?id=6153349


why don't they just change the red and white play-icon to a pause icon?


Changing the title also helps people who open everything in new windows.


I'm a little disappointed. When I noticed the play icon on the tab I rejoiced and thought that was an actual control for pausing/resuming on the tab.

Sadly that wasn't the case.


Hypem has had this feature for a long time now! Very cool:

http://hypem.com/


I wish they'd fix the buffering issues.


How long until "Method for adding an indicator to show if a web page is playing audio" is patented?


I just noticed this watching Carmack's Quake Con talks!


THANK. GOD.


Soundcloud has done this from the beginning. Nothing new here, move along.


Bandcamp does it too (Soundcloud did it first, though), but it's still nice to see it catching on.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: