Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:JSR-135 - VideoControl does not show captured content when Player object is started before setting the Displayable as current (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
S60 3rd Edition FP1
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (14 Aug 2013)



A Player object is created in order to capture an image from the phone’s camera. A VideoControl object is then created and appended to an LCDUI Form. When the Player object is started before setting the form as the current displayable, VideoControl does not show the captured content.The CustomItem control paints only white background.


This happens whenever a Player object is started before Display.getDisplay() is called.

How to reproduce

  Form form = new Form("Camera");
// Initializing VideoControl for snapshot taking
player = Manager.createPlayer("capture://video");
vControl = (VideoControl)player.getControl("VideoControl");
form.append((Item)(vControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null)));
player.start(); // user can see where the camera points
vControl.setVisible(true); // the video control remains blank


There is currently no solution. However, the issue can be avoided if Display.getDisplay() is called at least once during the MIDlet’s lifecycle before starting the Player, e.g. in the beginning of MIDlet’s constructor.

  form.append((Item)(vControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null)));       
// Calling Display.getDisplay before starting the player
player.start(); // user can see where the camera points
This page was last modified on 14 August 2013, at 11:29.
40 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.