Page 1 of 2
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 3:13 pm
by SNOOPP
I simply want to change orientation from portrait to landscape when some pages are loaded. What javascript i should write to do this?
Spend a lot of time already while searching and still can't find anything. I know how to get current orientation, but have no idea how to set.
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 3:21 pm
by SNOOPP
navigator.screenOrientation.set('landscape'); doesn't work
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 4:00 pm
by Zahhar Kirillov
Hi!
Same problem here. Seems old approach does not work anymore. Used to do it this way:
$(window).bind('orientationchange', function(e) {
/* do something */
});
How to detect orientation change using Appery now?
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 5:12 pm
by Kateryna Grynko
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 6:25 pm
by Zahhar Kirillov
Thanks, Katya. I already found it and did like it was advised there, but with no luck at all.
Testing my app on iPhone5/iOS7 and LG G2/Android 4.2.2 in browser mode and through Appery Tester app, but can't make an app respond to device rotation.
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 6:44 pm
by Kateryna Grynko
Zahhar,
Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 8:02 pm
by Kateryna Grynko
Let us know when your app is shared please. What is the app name?
How set screen orientation to landscape with javascript?
Posted: Wed Feb 26, 2014 11:33 pm
by Zahhar Kirillov
App is shared. It named "Lux". Please have a look.
How set screen orientation to landscape with javascript?
Posted: Thu Feb 27, 2014 10:27 am
by SNOOPP
have you seen our project?
How set screen orientation to landscape with javascript?
Posted: Thu Feb 27, 2014 10:41 am
by Maryna Brodina
Sorry, not yet. I'll update.