If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Visitor
santa-claus
Posts: 1
Registered: ‎02-24-2011
My Device: Not Specified

Play mp3 on web widget

Hi all,

Now I will develop blackberry widget app like a content music application but I still face 2 problem like below this 

1. Can I get mobile number (msisdn) from widget api like below this but still not work.

<script type="text/javascript">
    var lines = blackberry.identity.phone.getLineIds();
    for (var i = 0; i < lines.length -1; i++)
    {
        alert("Line id : " + lines[i] + " has phone number : " + blackberry.identity.phone.getLineNumber(lines[i]));
    }
</script>

 

2. Can we play MP3 over http on web widget by using 

	var playerInstance = new  blackberry.audio.Player("file:///store/home/user/music/filename.mp3");    
	 playerInstance.play();

after use code like this the widget application throw exception like a undefined

 

Could you please to suggestion how to play mp3 over http on web widget

 

Thank

Sarawut

Please use plain text.