Forum Discussion

Colin_McCrae's avatar
Colin_McCrae
Community Hero
11 years ago

Chrome 32 - Audio Indicator?

Hi You may have noticed that Chrome 32 has introduced an audio indicator in the tab for that page. Any time audio is played by the page open on that tab, you get a little speaker to indicate th...
  • TanyaYatskovska's avatar
    11 years ago

    Hi Colin,


     


    I performed some investigation. It turned out that the value of the Description property of the target tab is changed when the music is playing on it. This tab is playing audio is added to the end of the tab title. You can check it in the Object Browser. So, you can use the script below to identify whether the music is playing on the specified tab:


     




    //JScript


    function TestAudioIndicatorInChrome()


    {


     // change <TAB TITLE> in the line below 


      var tabObj = Sys.Browser("chrome").BrowserWindow(0).Client("Google Chrome").

         Client(1).Client(0).TabList(0).PageTab("<TAB TITLE>");


      var tabTitle = tabObj.Description;


      var strPlay = "This tab is playing audio";


      var Res = aqString.Find(tabTitle, strPlay);


      if ( Res != -1 ) 


        Log.Message("The music is playing")


      else


        Log.Message("The music isn't playing")


    }




     


     


    How does it work for you?