Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video loaded from Steaming Assets fails to play on start/ready on iOS #1592

Closed
Wayne-nulitics opened this issue Jul 14, 2023 · 3 comments
Closed
Assignees
Labels
Bug 🐛 Something isn't working Fixed A fix will be in the next release iOS iOS platform
Milestone

Comments

@Wayne-nulitics
Copy link

When doing a new build on iOS and not using a built in splash screen the app opens, loads the Video but does not play the video.

  • Unity version: 2022.3.4f1
  • AVPro Video version (number and edition (trial/core/ultra/enterprise)): Ultra 5.1.7
  • Operating system version: iOS 16
  • Device model: iPhone 12 Pro
  • Video specs (resolution, frame-rate, codec, file size): 1024x1024, H264, 2Mb

To Reproduce

  1. Set spalsh scene to none
  2. Load video from Streaming Assets folder and Render to RawImage via Render to Texture
  3. Build and test
  4. See error: Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x101306f60>.

Logs
Log Event: MetaDataReady
SplashScene:MediaPlayerEvents(MediaPlayer, EventType, ErrorCode)
UnityEngine.Events.UnityEvent`3:Invoke(T0, T1, T2)
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateEvents()
RenderHeads.Media.AVProVideo.MediaPlayer:Update()

Log Event: ResolutionChanged
SplashScene:MediaPlayerEvents(MediaPlayer, EventType, ErrorCode)
UnityEngine.Events.UnityEvent`3:Invoke(T0, T1, T2)
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateEvents()
RenderHeads.Media.AVProVideo.MediaPlayer:Update()

2023-07-14 08:17:33.888683+0200 AR Survey Tool[1072:753862] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x101306f60>.
Log Event: Started
SplashScene:MediaPlayerEvents(MediaPlayer, EventType, ErrorCode)
UnityEngine.Events.UnityEvent`3:Invoke(T0, T1, T2)
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateEvents()
RenderHeads.Media.AVProVideo.MediaPlayer:Update()

Log Event: FirstFrameReady
SplashScene:MediaPlayerEvents(MediaPlayer, EventType, ErrorCode)
UnityEngine.Events.UnityEvent`3:Invoke(T0, T1, T2)
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateEvents()
RenderHeads.Media.AVProVideo.MediaPlayer:Update()

Log Event: ReadyToPlay
SplashScene:MediaPlayerEvents(MediaPlayer, EventType, ErrorCode)
UnityEngine.Events.UnityEvent`3:Invoke(T0, T1, T2)
RenderHeads.Media.AVProVideo.MediaPlayer:UpdateEvents()
RenderHeads.Media.AVProVideo.MediaPlayer:Update()


Code used for customer splash video

[SerializeField] private MediaPlayer mediaPlayer;
private void OnEnable()
{
mediaPlayer.Events.AddListener(MediaPlayerEvents);
}
private void OnDisable()
{
mediaPlayer.Events.RemoveListener(MediaPlayerEvents);
}
private void Start()
{
mediaPlayer.OpenMedia(false);
}
private void MediaPlayerEvents(MediaPlayer mp, MediaPlayerEvent.EventType eventType, ErrorCode code)
{
Debug.Log(eventType);
switch (eventType)
{
case MediaPlayerEvent.EventType.ReadyToPlay:
mediaPlayer.Control.Play();
break;
case MediaPlayerEvent.EventType.FinishedPlaying:
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
break;
}
}

@Chris-RH Chris-RH added the iOS iOS platform label Jul 14, 2023
@MorrisRH
Copy link
Collaborator

Reproduced using Unity 2022.3.2f1, AVPro Video 2.8.2, iPhone 13 Pro, iOS 16.5.1
Not reproduced using iPhone X, iOS 14.8.1.

Will get a fix into the next release for this.

The Unity error is nothing to do with AVPro Video.

@MorrisRH MorrisRH added the Bug 🐛 Something isn't working label Jul 14, 2023
@MorrisRH MorrisRH self-assigned this Jul 14, 2023
@MorrisRH MorrisRH added this to the 0 - Next Release milestone Jul 14, 2023
@MorrisRH MorrisRH added the Fixed A fix will be in the next release label Jul 14, 2023
@MorrisRH
Copy link
Collaborator

This issue has been fixed and will make it into the next release, version 2.8.3

@MorrisRH MorrisRH modified the milestones: 0 - Next Release, 2.8.3 Jul 21, 2023
@Chris-RH
Copy link
Collaborator

AVPro version 2.8.3 has been released. Please let us know if this has not fixed your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working Fixed A fix will be in the next release iOS iOS platform
Projects
None yet
Development

No branches or pull requests

3 participants