Search Unity

Bug Video length is 0 after PrepareCompleted in tvOS 14 Beta 6

Discussion in 'Audio & Video' started by fakegood, Aug 28, 2020.

  1. fakegood

    fakegood

    Joined:
    Oct 11, 2013
    Posts:
    31
    I am using Unity 2019.4.9f1, exported to Xcode 12 beta targeting tvOS 14, following the example provided from https://docs.unity3d.com/2019.1/Documentation/ScriptReference/Video.VideoPlayer.html, setting URL to a video located in StreamingAssets folder will have the video reporting the correct length at the first frame after videoPlayer.Play() is called, and then 0 length from second frame onwards.


    Code (CSharp):
    1. Initialize engine version: 2019.4.9f1 (50fe8a171dd9)
    2. 2020-08-28 15:48:11.253403+0800 appname[204:8184] Errors found! Invalidating cache...
    3. 2020-08-28 15:48:11.362273+0800 appname[204:8184] Errors found! Invalidating cache...
    4. UnloadTime: 0.206750 ms
    5. prepared video player - False
    6. Example:VideoPlayerPrepareCompleted(VideoPlayer)
    7. UnityEngine.Video.EventHandler:Invoke(VideoPlayer)
    8. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    9.  
    10. 0/27.0166664123535
    11. Example:Update()
    12. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    13.  
    14. 0/0
    15. Example:Update()
    16. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    17.  
    18. 0/0
    19. Example:Update()
    20. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    21.  
    22. 0/0
    23. Example:Update()
    24. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    25.  
    26. 0/0
    27. Example:Update()
    28. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    29.  
    30. 0/0
    31. Example:Update()
    32. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    can I know is there any workaround at the moment?
     
  2. harini

    harini

    Unity Technologies

    Joined:
    May 28, 2015
    Posts:
    45
    Hi,
    Can you please let us know if this also happens when the target platform is Mac standalone or is this specific to TvOS?

    Thanks and regards,
    Harini
     
  3. fakegood

    fakegood

    Joined:
    Oct 11, 2013
    Posts:
    31
    Hello! This happened only on tvOS. Tested on macOS and iOS and both don't have problem with it.
     
    Last edited: Aug 28, 2020
  4. fakegood

    fakegood

    Joined:
    Oct 11, 2013
    Posts:
    31
    Update: if I call videoPlayer.Stop() and videoPlayer.Play() again, it will be playing again. :)