phonegap で Android アプリを作成しています。その向きはポートレート モードです。
タブレット PC でビデオを再生するために HTML5 ビデオ タグを使用しています
しかし、ビデオに関しては、ランドスケープ モードで再生する必要があります。
どうやってやるの?
phonegapが初めてなので、これを解決するのを手伝ってください
ありがとう
phonegap で Android アプリを作成しています。その向きはポートレート モードです。
タブレット PC でビデオを再生するために HTML5 ビデオ タグを使用しています
しかし、ビデオに関しては、ランドスケープ モードで再生する必要があります。
どうやってやるの?
phonegapが初めてなので、これを解決するのを手伝ってください
ありがとう
You can change the orientation mode in an Android Phonegap app using this plugin. The version on GitHub is out-of-date and doesn't work with recent versions of Phonegap but I have updated it - you can find the source code in my answer to this question or download my Eclipse test project which includes the updated code.
You should be able to use the plugin to set your app into landscape mode on playing a video:
cordova.require('cordova/plugin/screenorientation').set("landscape");
and restore it to portrait on stopping the video:
cordova.require('cordova/plugin/screenorientation').set("portrait");
phonegap でそれを変更することはできません。
AndroidManifest.xml で設定できます。追加するだけです
android:screenOrientation="landscape"
あなたに<activity>
ただし、アプリケーション全体が横向きに設定されます。