Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm following the API documentation at

My code, very simplistic:

var Unity = external.getUnityObject(1,0);
Unity.init({name: "Radio Battletoads",
        iconUrl: "",
        onInit: setupMediaPlayer

function unityPlayPause(){
    // TODO

function setupMediaPlayer() {
  // Test the Media Player
  Unity.MediaPlayer.init("Radio Battletoads");
  var trackInfo = {title: "Todo",
             album: null,
             artist: null,
             artLocation: null};
  // Test an action
  Unity.addAction('/Reproducir', unityPlayPause);
  // Test a notification

The notification is shown, but neither the media player nor the action are working. I've taken a look at the bundled userscripts and I can't see any remarkable difference from my code.

Has somebody experienced this?

Installed version:

$ dpkg -l | grep unity-webapps
ii  libunity-webapps-chromium                      1.9-0precise2                                               Unity WebApp extension for chromium/chrome browser
ii  libunity-webapps0                              1.9.1-0precise2                                             Web Apps integration with the Unity desktop
ii  unity-webapps                                  1.9-0precise2                                               Unity WebApp integration scripts
ii  unity-webapps-preview                          2.1                                                         Unity Webapps Preview metapackage
ii  unity-webapps-service                          1.9.1-0precise2                                             Service for Web Apps integration with the Unity desktop
share|improve this question
up vote 0 down vote accepted

You are being bitten by lp:1031933. Remove the space from your name: parameter in the Unity.init call, and everything should fall right into place. This is on my TODO. Our bug fixing phase will be starting very soon, if I don't get to it before then.

share|improve this answer
Thank you Alex, that solved my problem. Everything seems to be working now. Keep up the good work! :) – Jorge Suárez de Lis Aug 13 '12 at 15:34
subscribe to that bug so you can be notified when it's fixed – Alex Launi Aug 13 '12 at 15:38
Thank you, I've just done it :) – Jorge Suárez de Lis Aug 13 '12 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.