Invoke Media Player in BlackBerry - blackberry

Is there is a way to invoke a media player in BlackBerry ?
If so, can we also pass a url to the player asking it to open and stream a remote url file?

Are you talking about invoking the standard media application or just embed player in your app?
1)If you want to embed player check this - http://supportforums.blackberry.com/t5/Java-Development/Playing-Audio-in-Your-Application/ta-p/446826
2)If you need to start the standart bb player you can use the Content Handler API(CHAPI). Look around and you will find many tutorials. Basically it works like this: you have a .mp3 file for example and you make request to the blackberry os asking "can anyone handle .mp3 extension" , and if there is an app registerred to handle mp3 you can invoke it automatically and i handles tha fore/background transitions between your app and the mp3 handling app.

Related

How to play internal sound files from iOS/iPhone in my app?

I am trying to use the internal sound files such as alarm, siren etc.. in an app I am trying to code. Basically when I turn a switch on, I want one of the internal sound files of my choosing to play.
I am currently using WAV's in the project file to do this, but I would like to use the internal sound files on iOS.
How can this be done/accessed?
You can use the iOSSystemSoundsLibrary like: <AudioToolbox/AudioToolbox.h>.
The way it works is: AudioServicesPlaySystemSound (1003); // SMSReceived.
The list of sound and the examples "How to use" you can find at the page: TUNER88.

youtube player in blackberry

I have the url video on youtube and I want to play the video in the youtube default application on the blackberry without invoking the browser to play
enter code here
I've never found a way to do this. The BlackBerry Invoke class does not have a constant defined for the Youtube app, which is what you can use to open other built-in apps.
I know this isn't what you'd prefer to do, but a couple other alternatives are:
open Youtube videos in the Browser, like this:
Browser.getDefaultSession().displayPage("http://www.youtube.com/watch?v=ciB6ExQa5SM");
take a look at the BlackBerry Youtube Client sample, which would allow you to build an embedded Youtube player. A companion blog post can also be found here. Note: the sample probably won't display video in a simulator, as I think you need to have a valid cellular carrier setup (APN settings, etc.) for the network to allow youtube streaming.

I want to automatically load local video and audio in a phone gap application on the iPad

I want to automatically load local video and audio without clicking/swiping, etc. on a PhoneGap application on the iPad. I'm considering creating an objective-c plugin, would this be the correct way or is there another work around i.e. a plugin, javascript way etc?
Given that a phonegap app is basically a wrapped webapp, I think you may be out of luck, apple requires a user action to play media on the iPad (actually, audio, I don't know either way for video). Here's a source.
See the user controls or media playback controls section. Even though your data is local, the play action is disabled without an action

How to Embed Ustream video into iOS

Has anyone found a way to easily embed ustream video within a iphone or ipad app? I have sent emails to the ustream support, but no response. I really dont want to run through ffmpeg or anything.
The easiest way is by just opening the embed URL (e.g. http://www.ustream.tv/embed/10638475) using a UIWebView. This will use HTTP Live Streaming on iOS.
Alternatively you can use a URL like http://iphone-streaming.ustream.tv/uhls/10638475/streams/live/iphone/playlist.m3u8 to initiate an AVPlayerItem and use an AVPlayer and AVPlayerLayer to play the stream within the app's UI (very useful if you don't want it to be full screen).
Try:
<iframe id="UstreamIframe" src="http://www.ustream.tv/embed/10638475"></iframe>

Is there any way I can make podcast application from iphone play my podcasts ? ( with code )

I'm doing an application that can play podcasts, but i feel more comfortable if the iPhone default podcast application plays the files, instead of me having to handle them.
When I pass the URL to the sharedApplication object, Safari opens and starts playing it ... but I'd like to skip the user seeing Safari. Is there any way?
The podcasts app does not have a public API. Therefore you cannot get it to play podcasts on your behalf.
Since the podcasts are added to your media library you should be able to find them with a media library query and start background playback easily.

Resources