12-15-2012 08:04 AM
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
Solved! Go to Solution.
12-17-2012 02:06 PM
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/kitc
12-17-2012 02:25 PM
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?
12-17-2012 04:12 PM
Could you please post a screenshot of exactly what you are referring to? Want to make sure I understand you completely.
12-17-2012 04:33 PM - edited 12-18-2012 08:45 AM
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.
12-18-2012 09:42 PM
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
12-19-2012 01:36 AM
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!!
12-19-2012 01:28 PM
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-Packag
env : [{
_attr : { value : '8', var : 'WEBKIT_NUMBER_OF_BACKINGSTORE_TILES'}
},{
_attr : { value : 'true', var : 'WK_SUPPRESS_HTML5_MEDIA_BUBBLE'}
}]
Hope that helps.
12-20-2012 02:26 AM
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
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.
01-14-2013 11:40 AM
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!!