I am experiencing a very weird issue.
The video player accepts the URL when directly assigned to it. Check below:
vidPlayer.url = "http://www.arcards.net/videos/VuforiaSizzle.mp4";
But, it does not accept the video when it is assigned via a variable. Check the code below. ‘w’ comes from a PHP file (via Jason). I’m using a web form.
When I print the url variable on the console it is perfectly printed without ANY errors. Please check the result below:
http://www.arcards.net/videos/VuforiaSizzle.mp4
url = w.text; url = url.Replace("\"",""); url = url.Replace("\\",""); vidPlayer.url = url;
The Video Player is not accepting the URL via a variable. Please check the ERRORS below:
-
Player failed to load "file:///Users/benysebag/ARinvitationCard03/http://www.arcards.net/videos/VuforiaSizzle.mp4 "
-
VideoPlayer cannot play url : http://www.arcards.net/videos/VuforiaSizzle.mp4
-
Error: VuforiaSizzle
Error Message: Player failed to load "file:///Users/benysebag/ARinvitationCard03/http://www.arcards.net/videos/VuforiaSizzle.mp4 "
UnityEngine.Debug:LogError(Object)
VideoController:HandleVideoError(VideoPlayer, String) (at Assets/SamplesResources/SceneAssets/ImageTargets/Scripts/VideoController.cs:151)
UnityEngine.Video.VideoPlayer:InvokeErrorReceivedCallback_Internal(VideoPlayer, String)
4)Error: VuforiaSizzle
Error Message: VideoPlayer cannot play url : http://www.arcards.net/videos/VuforiaSizzle.mp4
UnityEngine.Debug:LogError(Object)
VideoController:HandleVideoError(VideoPlayer, String) (at Assets/SamplesResources/SceneAssets/ImageTargets/Scripts/VideoController.cs:151)
UnityEngine.Video.VideoPlayer:InvokeErrorReceivedCallback_Internal(VideoPlayer, String)
Please let me know if you have any hint for this issue to be solved.
Thanks,
Beny.