You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
Player does not play on Android. Same code works on iOS.
The line of code breaking on Android is:
bool isOpening = videoPlayer.OpenMedia(new MediaPath(videoClipUrls[j], MediaPathType.AbsolutePathOrURL), autoPlay: false);
_fuckup.text += "Creating media player: " + j;
//Create new Object to hold the Video and the sound then make it a child of this object
GameObject vidHolder = new GameObject("VP" + j);
MediaPlayer videoPlayer = vidHolder.AddComponent<MediaPlayer>();
//videoPlayerList.Add(videoPlayer);
////Add VideoPlayer to the GameObject
//VideoPlayer videoPlayer = vidHolder.AddComponent<VideoPlayer>();
// videoPlayerList.Add(videoPlayer);
//Add AudioSource to the GameObject
//AudioSource audioSource = vidHolder.AddComponent<AudioSource>();
//Disable Play on Awake for both Video and Audio
//videoPlayer.playOnAwake = false;
//audioSource.playOnAwake = false;
videoPlayer.AutoStart = false;
_fuckup.text += "OpenMedia starting: " + videoClipUrls[j];
bool isOpening = videoPlayer.OpenMedia(new MediaPath(videoClipUrls[j], MediaPathType.AbsolutePathOrURL), autoPlay: false);
_fuckup.text += "OpenMedia Completed: " + videoClipUrls[j];
//Changing the media hints for content loaded via Path
_fuckup.text += "getting hints: ";
MediaHints hints = videoPlayer.FallbackMediaHints;
hints.stereoPacking = StereoPacking.TopBottom;
_fuckup.text += "settings hints: ";
videoPlayer.FallbackMediaHints = hints;
// UNCOMMENT HERE
////We want to play from video clip not from url
//videoPlayer.source = VideoSource.Url;
////Set video Clip To Play
//videoPlayer.url = videoClipUrls[j];
////Set Audio Output to AudioSource
//videoPlayer.audioOutputMode = VideoAudioOutputMode.Direct;
//videoPlayer.isLooping = true;
////Assign the Audio from Video to AudioSource to be played
//videoPlayer.EnableAudioTrack(0, true);
//videoPlayer.SetTargetAudioSource(0, audioSource);
_fuckup.text += "adding Listener: ";
videoPlayer.Events.AddListener(HandleEvent);
}
}
catch (Exception e)
{
Settings.LogError(e);
_fuckup.text += e.ToString();
}
Deploy on iPhone works
Deploy on Android Samsung S10, Pixel 5, all
Logs
See screenshots
Screenshots
Videos
If applicable, add a copy of your video or the URL
Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE
Thanks for reporting this @livetreetech. In our last release (v2.5.0) we were forced to upgrade the version of the guava library due to ExoPlayer requiring it. We did put in a pre-build process step to detect and offer removal of the old guava library file found in releases prior to v2.5.0 (guava-27.1-android). But this is limited to AVPro Video plugin files.
It looks in your case like guava.28.1-android was brought in by another plugin (Firebase I assume). This will be the case for any plugins that also use guava I suspect.
Describe the issue
Player does not play on Android. Same code works on iOS.
The line of code breaking on Android is:
bool isOpening = videoPlayer.OpenMedia(new MediaPath(videoClipUrls[j], MediaPathType.AbsolutePathOrURL), autoPlay: false);
NOTE:
We had duplicateClass
#630
We solved this by DELETING ONE ONLY of the following jar files:
or
To Reproduce
Install Unity 2020.3.1f1
Install Firebase 7.2.0 SDK all packages
Install AVPro "AVPro Video v2.5.0 - 5 May 2022"
Run this code
for (int j = 0; j < videoClipUrls.Count; j++)
{
Deploy on iPhone works
Deploy on Android Samsung S10, Pixel 5, all
Logs
See screenshots
Screenshots
Videos
If applicable, add a copy of your video or the URL
Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE
Instead email the link to us unitysupport@renderheads.com
The text was updated successfully, but these errors were encountered: