Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none
Accepted Solution

BB10 - Audio without the information in the volume area

Hi there,

 

I'm using the HTML5 Media APIs to use audio inside an app. I also tried to use Cordova Media API and it is working. In both cases there are informations about the media file I'm using when I change the volume by keys, but I don't want to show this informations. I couldn't find something around to hide those informations from the volume information view.

 

Hope someone out there can help with it?!! THX


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - Audio without the information in the volume area

Do you mean the default player control that the web engine renders when you embed an <audio> element in your page?

 

If so you could hide the default controls="controls" property, and define your own start / stop buttons (that link to the corresponding JavaScript functions of the audio element): 

http://blackberry.github.com/WebWorks-Samples/kitchenSink/html/html5/audio.html

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - Audio without the information in the volume area

Hi Adam,

 

what I'm asking for is the information shown when I hit the volume up/down keys of either the Playbook or the Dev Alpha it shows me informations about the source I'm "playing"  as a background sound within the app.

 

I tried to use sound.controls = false; but it isn't working like expected. Do you have any other solution or hint?


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - Audio without the information in the volume area

Could you please post a screenshot of exactly what you are referring to? Want to make sure I understand you completely.  

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - Audio without the information in the volume area

[ Edited ]

Hi Adam,

 

see this screenshot sample from the Dev Alpha. The Backward|Play|Forward buttons are the things I want to hide when using HTML5 audio to play a sound within the app or using the Media API when using Cordova/Phonegap but it doesn't seem to work.

 

On the Playbook the same "issue" for me, always the Pause (||) button up in the controls bar next to the clock on the top.

 

 

sound_dialog_audio_controls.jpg

 

sound_dialog_audio_controls2.jpg


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - Audio without the information in the volume area

Thanks!

 

Just had a good conversation with the browser folks and I've been able to confirm 2 things:

 

1) The prev/pause/next controls will always appear in this volume 'toast' bubble. There is no way to hide that.

 

2) They are working on improving the look and feel of this toast.

 

So we can expect the end user experience to get better in a future OS update.

 

Hope that helps!

Adam

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - Audio without the information in the volume area

Hi Adam,

 

so there isn't a way to use audio within any WebWorks app that is hidden from this volume 'toast' bubble, isn't it? Or do you know a way or sample implementation to use audio that gets hidden from it.

 

Again, THX for your comment!!


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Retired
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - Audio without the information in the volume area

There may be a way to customize it.  There are some environmental variables that can be added to the WebWorks framework.  Generally these are undocumented and very subject to change.  So use them at your own risk.

 

If you look in the SDK/lib/native-packager.js file, you'll see an env property for the xmlObject.  This is used to create the bar-descriptor.xml file that is added to a compiled BAR file.  There is already one environmental variable specified here: WEBKIT_NUMBER_OF_BACKINGSTORE_TILES.

 

If you edit this native-packager.js file, and add the WK_SUPPRESS_HTML5_MEDIA_BUBBLE environmental variable to it, it should change the behavior of the volume toast. I don't think it will get rid of it entirely, but it may prevent the song title/image and the prev/pause/next buttons from appearing.  Recommend backing up any SDK files you edit. Otherwise may need to reinstall to fix unknown issues.

 

https://github.com/blackberry/BB10-Webworks-Packager/blob/master/lib/native-packager.js#L49-L51

 

env : [{
   _attr : { value : '8', var : 'WEBKIT_NUMBER_OF_BACKINGSTORE_TILES'}
            },{
   _attr : { value : 'true', var : 'WK_SUPPRESS_HTML5_MEDIA_BUBBLE'}
}]

 Hope that helps.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - Audio without the information in the volume area

Hi Adam,

 

thank you very much for the hint. I tried and it seems to hide the song title/image but not the prev/pause|play/next buttons so I can click play and it is playing the last sound from the app. Somehow this is a piece of solution, but not the complete.

 

Do you think of something can be done to use (background)sounds within an app without such volume toast informations. Shouldn't it be default to hide such informations and only add them by a rim:smileytongue:ermission or something like that if you want to use such volume toast informations? That would be the way I can think of in app development. On the other way round there should be a possibility to really hide all informations from the environment until I use setting X, Y, and Z to make them available? Maybe I should open up an issue request for it on the Github repo.

 

THX.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - Audio without the information in the volume area

Hi there,

 

to let you know about it. After the update to BB10 OS 10.0.9.2320 and using the latest SDK version 1.0.4.7 it seems working now. THX again!!


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.