| Reply | « Previous Thread | Next Thread » |
|
Hi!
Is there a way or is it possible to invoke the default media player of a device (phone)? If so, how? Thanks!! |
| anxamobile |
| View Public Profile |
| Find all posts by anxamobile |
|
This is supposedly against the sandbox principle to let the KVM interact with native software on the phone but it seems to me there was a way for a MIDlet to launch the browser for a certain URL so maybe that can be used to launch the video player using a URL that ends with .3gp...
OK, 'found it: MIDlet.platformRequest(URL) I never tried this myself but please let me know if it helps. |
| Emmanuel Raulo |
| View Public Profile |
| Find all posts by Emmanuel Raulo |
|
Hi!
I tried it using the code snippet below; <midletName>.platformRequest("http://java.sun.com/products/java-media/mma/media/test-mpeg.mpg"); and the MIDlet suite invokes the device's browser. However, when I tried it using a local file (a file included in the jar file), nothing happened. Here's my code; <midletName>.platformRequest("file:///test.3gp"); and I also tried this line; <midletName>.platformRequest("/test.3gp"); Anyway, thanks for replying to this thread. |
| anxamobile |
| View Public Profile |
| Find all posts by anxamobile |
|
A resource indicator starting with file:// identifies a file on the local file system.
You can try resource:///test.3gp but I think the native browser will not be able to handle the URL as it has no access to the JAR, logically. Maybe you should have your app copy the file on the local file system before invoking the browser with a file:// URI. Next week I'll give a try to HTTP, which might work arround my pb with 6680 and N90... |
| Emmanuel Raulo |
| View Public Profile |
| Find all posts by Emmanuel Raulo |
|
That was late but I gave a try to playback over HTTP and it works !!! :)
(or at least on 3230) My URL does not end with .3gp because my contents are served by a PHP script so it's something like http://my.server.com/content.php?ID=xx. Instead I correctly set the Content-type: HTTP header and the native browser was able to handle it. The "problem" now is that one has to close the native player, close the white browser page and close the browser application before being able to return to my MIDlet (one could hold the application key to switch to the right task but the average user won't do that). Maybe I can get rid of the white browser page by removing the Content-Disposition: attachment; filename="video.3gp" HTTP header Hey, sometimes those sweet little mobiles just work ! :) |
| Emmanuel Raulo |
| View Public Profile |
| Find all posts by Emmanuel Raulo |
|
Yes, exactly what happened when I tested it. The device invoked its native browser to download the file. When it's done, it invokes the native player and then play the file. The user has to explicitly choose the midlet from the 'taskbar' to return to it. It's kind of not user-friendly right?
Anyway, I have a little question to ask. On the initDisplayMode method of VideoControl, I used USE_DIRECT_VIDEO as the first argument, and 'this' to refer to my current object in order to play it using the current canvas. Now, what if I want another canvas to be able to display the video, can I just pass a reference of that canvas as a second argument to initDisplayMode method? For example; public initPlayer(Canvas canvas) { /*some initialization here */ videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, canvas); } I am using this implementation so that I can have a specialized class which its job is video initialization and playback. It will not be a subclass of Canvas. And other classes (maybe subclass of Canvas) can just call it to play the video file. Thanks! |
| anxamobile |
| View Public Profile |
| Find all posts by anxamobile |
|
Yes there is a way to invoke default application in other application
Methods are given in this pdf S60_Platform_Utilizing_External_Application_Views_v2_0_en.pdf just get it from forum.nokia site. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Query OS for default video player? | chriscammacr | Symbian Media (Graphics & Sounds) | 2 | 2005-08-29 08:42 |
| Player does not support playing back other format-audio than default format? | williampresent | Mobile Java Media (Graphics & Sounds) | 0 | 2005-08-09 10:14 |
| how to set new video player to the default player | rj55 | General Symbian C++ | 1 | 2005-06-16 13:15 |
| change the default real player? | lior_zilberg | General Symbian C++ | 0 | 2005-03-02 10:28 |
| Setting default APN for RealOne Player | soniatm | Symbian Networking & Messaging | 1 | 2003-11-02 22:10 |