si vous avez javascript à votre disposition ou un autre moteur de script, avez-vous essayé de donner l'élément vidéo et de l'élément incorporez un attribut id et l'accès à l'utilisation de javascript DOM pour modifier les attributs?
<body>
<video id="myvideo" width="240" height="320" src="a.vp8">
<embed id="myvideoe" width="240" height="320" src="a.vp8">
</video>
<script type="text/javascript">
if (window.screen.width < window.screen.height) {
//portrait
document.getElementById('myvideo').setAttribute('width', 240);
document.getElementById('myvideo').setAttribute('height', 320);
document.getElementById('myvideoe').setAttribute('width', 240);
document.getElementById('myvideoe').setAttribute('height', 320);
} else {
//landscape
document.getElementById('myvideo').setAttribute('width', 320);
document.getElementById('myvideo').setAttribute('height', 240);
document.getElementById('myvideoe').setAttribute('width', 320);
document.getElementById('myvideoe').setAttribute('height', 240);
}
//or simply do this if you have differing size target screens:
//you can always subtract out the space for the controls.
document.getElementById('myvideo').setAttribute('width', window.screen.width);
document.getElementById('myvideo').setAttribute('height', window.screen.height);
document.getElementById('myvideoe').setAttribute('width', window.screen.width);
document.getElementById('myvideoe').setAttribute('height', window.screen.height);
</script>
</body>
si vous parlez de changer le src à une vidéo tout à fait différent qui est portrait ou paysage, ce qui est possible aussi. Je pense que cela pourrait être possible seulement avec PhoneGap qui fournit javascript.
Lit la vidéo avec quicktime, ce qui nécessite l'installation du plug-in quicktime. Idée brillante. Je souhaite juste qu'il ne dépende pas d'un plugin. – Adam