Closed jiuchengzjy closed 1 year ago
We always urge using the latest releases. So that might be worth updating to.
What optimisation/stripping options do you have set? You might be being too aggressive. See notes here .
emm, I changed medialinfo to absolute path or url. and i changed Video API to Exo Player. So should I use the latest releases? but AVpro-2.6.6 can play successfully when using Media Reference,adn demo can played.
i don't use Android [minify options]
If you use Android minify options, AVPro Video will be stripped out and will not work. The following options need to be added to your proguard configuration file (in Player Settings > Android > Publishing Settings > Build > Custom Proguard File) to prevent AVPro Video classes from being removed:
-keep class com.renderheads.AVPro.Video.* { ; } -keep class com.google.android.exoplr2avp. { ; } -keep class com.twobigears.audio360. { ; } The above is included in /Assets/AVProVideo/Runtime/Plugins/Android/proguard-avprovideo.txt
When using Unity 2020.1 and above it has been seen that the build process overly optimises which causes issues in the ExoPlayer library. To overcome this issue, you will need to add a custom gradle property. In Player Settings|Publisher Settings, enable the Custom Gradle Properties Template option. The template is found at: /Assets/Plugins/Android/gradleTemplate.properties and it should be edited adding the following line to the end of the file: android.enableDexingArtifactTransform=false (This should have been done automatically, but you might want to check).
emm , but i don't use Android minify options ?
And the proguard-avprovideo.txt exists
-keep class com.renderheads.AVPro.Video.* { ; }
-keep class com.google.android.exoplr2avp. { ; }
-keep class com.twobigears.audio360. { ; }
i try use MediaPlayer can not paly.
How does your main gradle look? what is your minSDK and targetSDK?
is this. oh,yesterday I updated to the latest releases , UnityPlugin-AVProVideo-v2.7.3-Trial.unitypackage And,After updating to 2.7.3, can see the video, but the video is very stuck, and both video and audio are stuck. be like walking forward for 2 seconds and bouncing back for 1 second. This effect is the same as that of 1.9.17b,alos ducatan. What should I modify to play smoothly?
So you are not getting the previous error any more? What are the specs of the video (resolution, codec, fps etc) Is it streaming or playing locally? Is it playing properly in editor and the problem just on android? Are you getting the same result on all your devices? How does it play in a fresh project with just AVPro Video mediaplayer demo?
any more info?
use api : _mediaPlayer.OpenMedia(); Failed to play video on Android 11;
UnityPlugin-AVProVideo-v2.6.6.unitypackage Unity 2020.3.40f1c1 Android 11