Noticias

¡RECUERDA QUE SI ERES UN NUEVO USUARIO, DEBES PRESENTARTE PARA PODER PUBLICAR MENSAJES! | TENEMOS CANAL OFICIAL DE TELEGRAM: t.me/unity3dspain

Rotar videos

Iniciado por davidgomis, Octubre 20, 2015, 11:59:07 AM

Tema anterior - Siguiente tema
Muy buenas, Tengo un problemilla, en mi aplicación lanzo videos, y quiero que al verse el video la aplicación pueda rotar según la posición del terminal. Para ello uso esto:Screen.orientation = ScreenOrientation.AutoRotationEn IOS funciona perfectamente, pero en Android no hace nada. He pensado que puede que tenga algo que ver con el manifest, pero he tocado bastantes cosas y no hay manera, el video no se mueve. ¿Alguna idea?Muchas gracias

El default orientation del player settings que tienes?

Tengo puesto Portrait, porque la aplicación tiene que estar siempre en vertical, solo lo quiero cambiar cuando lanzo algún video. La cosa es que en IOS si que gira perfectamente...

Pero pones Portrait y arriba Autorotation? Fijate al cambiar de sistema no lo hayas cambiado.

No, el codigo es el mismo para las dos versiones. Y en IOS gira perfectamente cuando salen los videos. Toda la app esta en portrait, de hecho cuando sale de los videos lo vuelvo a poner a portrait. Y en el setting de IOS también esta puesto en portrait.Por eso pienso que debe de ser algo del manifest, que no configuro bien el reproductor de video de Android o algo....
Pongo el  manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0">
  <uses-feature android:name="android.hardware.camera" />
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:debuggable="false">
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:screenOrientation="fullSensor" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <!--
            To support devices using the TI S3D library for stereo mode we must
            add the following library.
            Devices that require this are: ODG X6
        -->
    <uses-library android:name="com.ti.s3d" android:required="false" />
    <!--
            To support the ODG R7 in stereo mode we must add the following library.
        -->
    <uses-library android:name="com.osterhoutgroup.api.ext" android:required="false" />
    <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
    </activity>
    <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
    </activity>
    <activity android:name="com.facebook.LoginActivity" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
    </activity>
    <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
    </activity>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 918876324812222" />
  </application>
</manifest>
<!-- android:installLocation="preferExternal" -->
 

Etiquetas: