Open IgorKubyshkin opened 8 hours ago
We've done a quick test and can't reproduce this.
I've just sent a link to unitysupport@renderheads.com
It's test project with one scene. I run this scene with audio playing in the loop. When I run it on android device, the audio doesn't play until I pause/unpause the app. I even doesn't click the test button Open Media
When I try to open media, click the button, the app crash. It's weird too, because there is no extra code there. Only the Open Media method
The test project you sent uses v3.1.0, not 3.1.2 as you initially stated.
Android - 3.1.2 Helper.cs public const string Windows = "3.1.0"; public const string WinRT = "3.1.0"; public const string Android = "3.1.2"; public const string Apple = "3.1.1";
You are right. My bad.
To be honest, I commented on line 56 - GradleMain Template( path ); in PreProcessBuild_Android. Because media3-exoplayer-work manager (in particular android.work work-runtime 2.8.1) conflicts with other plugins in my project. But if you uncomment, the problem with sound remains. But crash is gone).
In 'OnPostGenerateGradleAndroidProject( string path )'
...why is the call to 'GradleMainTemplate( path );' commented out? That is why ExoPlayer does not work.
I have reproduced it in your project/scene. I will look into why, but as could not reproduce this in our Demo_MediaPlayer scene...I am wondering if it is something specific to your scene/project.
I've just set video API to Exo Player and rebuilt. The same happens - no audio on start, but after pause/resume the app, it appears
I think "Mute Other Audio Sources" flag have an effect on this problem. But old version (3.0.8) works fine with this flag
I wonder why this is happening
Yup, just found the same looking at the differences. Disable it and it works fine.
We have made no changes in the MediaPlayer API path regarding this, so I am reluctant to call this an AVPro Video issue. I am going to try v3.0.8 myself to verify.
In my real project all fine with sound, until the Media player initialized. When I try to start any video in v3.1.2, the sound will go. When I roll back to 3.0.8, the sound appears
Verified that audio still works with that flag enabled in 3.0.8 + 3.0.9 + 3.0.10 + 3.0.11. It fails in 3.1.0 - which is when we updated to media3 v1.4.1 - and 3.1.1 + 3.1.2.
There is not much I can think of by way of reason as media3 is not even being initialised...and in your project you have completely removed the dependencies with the script change.
How can I get 3.0.11 as temporary solution? I think 3.0.8 has some issues I want to be resolved
If you email your Unity PDF invoice over to unitysupport@renderheads.com we can send send over 3.0.11
I noticed crashes with 3.0.8. I think it looks like https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1998
It looks like this issue has come about due to us adding in code to gain focus from the audio manager. We need to do this to catch when the OS takes focus for such things as incoming calls, alarms, etc. When this happens, we action a pause on all videos. Then, when focus is regained, we play those videos that were paused when focus was relinquished earlier.
Currently, we have no solution to satisfy both cases.
Unity version
2022.3.32f1
Unity editor platform
Windows
AVPro Video edition
Core
AVPro Video version
3.1.2
Device hardware
realme 8i
Which Android OS version are you using?
13
Unity Graphics API
OpenGLES 3, Vulkan
Video API
MediaPlayer
Texture format
BGRA
Audio output
Unity
Any other Media Player component configuration required to reproduce the issue.
No response
Which output component(s) are you using?
No response
Any other component configuration required to reproduce the issue.
No response
The issue
When the media player starts playing a video, any other sound (except directly video sound) disappears and does not even return after the video is closed. If you minimize/expand the application (pause/unpause), the sound will be restored. There was no such problem in the previous version (3.0.8) of the plugin I used. When playing the video again after the application has returned from background mode, the sound no longer disappears, i.e. it starts working as expected.
Media information
No response
Logcat output
No response