Thaks both of you for the help.
What I wanted to mean was that I shown the log but the screen didn't lock.
I'm testing always with a FiredoxOS device, sorry for not telling you
earlier.
I'll try with the manifest entry.
Thanks
On 02/20/2013 06:29 PM, Harald Kirschner wrote:
Hi Mar,
are you testing on an Android or a Firefox OS device?
You can try to request fullscreen first and then lock orientation; I believe
that's how I used it previously. I remember that the implementation didn't feel
quiet cross-platform when testing on FxOS and Android.
As Mounir said, you can also declare orientation and fullscreen in the app
manifest; which might yield the intended result if you make a game.
If it doesn't work, we should a bug
---
Harald Kirschner | Mozillian Partner & Labs Craftsman | [email protected]
(mailto:[email protected])
On Wednesday, February 20, 2013 at 8:30 AM, Mounir Lamouri wrote:
On 20/02/13 14:40, Mar wrote:
Hi guys!
I'm trying to lock the screen orientation for all my app. Then I add at
the beginning of my code these lines:
var portraitLock = screen.mozLockOrientation("portrait"); if
(portraitLock) {
console.log("Orientation locked to portrait");
}
It doesn't work and I don't have any idea what I'm doing wrong then I'm
asking you for any advice.
What do you mean by "it doesn't work"? The log isn't shown? The screen
isn't locked? The screen isn't locked the way you want?
Also, I think it would be better for you to specify the screen
orientation you want in the manifest directly so the window manager will
take care of that.
Cheers,
--
Mounir
_______________________________________________
dev-webapps mailing list
[email protected] (mailto:[email protected])
https://lists.mozilla.org/listinfo/dev-webapps
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps