Search Unity

Bug VideoPlayer does not play HTTPS Video from webserver

Discussion in 'Audio & Video' started by alphagate_kfe, Mar 18, 2022.

  1. alphagate_kfe

    alphagate_kfe

    Joined:
    Jan 28, 2019
    Posts:
    4
    i got a problem with the Unity VideoPlayer Component Streaming a video over https. The situation is as follows.


    We do have our own webserver where the video file is located.

    I Tested and downloaded the file from https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_5MB.mp4.

    This https address worked fine in the VideoPlayer and therefore I know the file is ok.


    When I load the File on our webserver, I can play the file in a web browser (e.g.: Chrome,Firefox,…) but when I try to play it with the VideoPlayer Component I will get the following errors.

    screenshot.png screenshot.png

    WindowsVideoMedia error 0x80072f8f while reading https://192.168.9.66/lion/runtime/Webserver/HelpGW/JobActions/Video/Big_Buck_Bunny_360_10s_5MB.mp4
    Context: MFCreateSourceReaderFromURL
    Error details: Fehler beim Decodieren des Inhalts.
    Track types:
    VideoPlayer cannot play url : https://192.168.9.66/lion/runtime/Webserver/HelpGW/JobActions/Video/Big_Buck_Bunny_360_10s_5MB.mp4
    Cannot read file.




    Also, when I change the address to HTTP I can play the video. http://192.168.9.66:8080/lion/runti...bActions/Video/Big_Buck_Bunny_360_10s_5MB.mp4 is working.


    Do we need to reference the Webserver somehow to the Unity Project or does anyone have any other input that might help me solve this issue?


    I use UnityVersion 2019.4.36f1 and also tried 2020.3.30f1

    Thanks in advance
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Is your web server listening on port 8080, so the video url with 8080 in it works, but the one without (which also uses https:) does not? HTTPS needs a certificate on the server trusted by the client’s trusted certificate authority. It uses port 443 by default too.
     
    alphagate_kfe likes this.
  3. alphagate_kfe

    alphagate_kfe

    Joined:
    Jan 28, 2019
    Posts:
    4
    The Certificate solved the Problem, Thanks