VideoPlayer doesn't work on iOS
Hi all,
I want to play video .mp4 on ios device code:
//videoPlayer.url = Path.Combine(Application.streamingAssetsPath, "2019-08-26_15-40-16.mp4"); //not working!
videoPlayer.url ="file://" + Path.Combine(Application.streamingAssetsPath, "2019-08-26_15-40-16.mp4");
videoPlayer.playOnAwake = true;
StartCoroutine(playVideo());
...
IEnumerator playVideo()
{
videoPlayer.Prepare();
//Wait until video is prepared
WaitForSeconds waitTime = new WaitForSeconds(5);
while (!videoPlayer.isPrepared)
{
Debug.Log("Preparing Video");
//Prepare/Wait for 5 sceonds only
yield return waitTime;
//Break out of the while loop after 5 seconds wait
break;
}
Debug.Log("Done Preparing Video");
//Play Video
videoPlayer.Play();
Debug.Log("Playing Video");
while (videoPlayer.isPlaying)
{
Debug.LogWarning("Video Time: " + Mathf.FloorToInt((float)videoPlayer.time));
yield return null;
}
Debug.Log("Done Playing Video");
}
It working on editor, but on ios device it's not @@
so, something wrong or what I missing somewhere?
thank for any help!
Comment
Your answer
Follow this Question
Related Questions
'Squashed' Aspect ratio for IOS 360 Video app 0 Answers
Video Player problems on iOS (Unity 2018) 0 Answers
how to send file (local path) using wwwForm on iOS and Android? 1 Answer
How to upload a video to Vimeo from within a Unity application under iOS 3 Answers
Handheld.PlayFullScreenMovie - when I hit maximise in the video controls does not return to game. 0 Answers