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:VideoControl.getDisplayWidth() returns null in S60 3rd Edition devices (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
Tested with
Devices(s): Nokia E70, Nokia N80, Nokia N91
Created: User:Technical writer 1 (19 Dec 2006)
Last edited: hamishwillee (29 Jul 2013)


The method videoControl.getDisplayWidth() works with Nokia 6680, S60 2nd Edition - but S60 3rd Edition devices return null.


Reading the value of videoControl.getDisplayWidth() in canvas returns null in S60 3rd Edition devices.

How to reproduce

If there is an instance of videoControl named "video", read the value of video.getDisplayWidth() and display output to user. This should return null. To confirm the problem, use the following method:

x = video.getSourceWidth();
y = video.getSourceHeight();

Set the the DisplaySize manually with the following line:


After this video.getDisplayWidth() should return a value (set to be the same as sourceWidth). It depends on the device whether it is equal or a few pixels less than the actual width of the current render would otherwise be. For example in the Nokia 6680 (where this problem does not occur), the original DisplayWidth is 160 and the sourceWidth returns value 156 for the used test video.

This page was last modified on 29 July 2013, at 11:08.
11 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.