UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

About Custom HTTP Headers for Basic Authentication

Open berise-hayashi opened this issue 2 years ago • 8 comments

I would like to play a video file in a directory with Basic Authentication set up.

https://www.renderheads.com/content/docs/AVProVideo/articles/feature-content-protection-ultra.html

Referring to the above page I have configured the authentication information with Base64 encoding from within the script to CustomHTTPHeaders.

On Android devices, playback was successful, but on UnityEditor, Windows, and iOS, an error message was displayed and playback was not possible.

When the exact same video file was placed in a directory on the same server where basic authentication was not set, the video played without issue in all environments.

Is this a known issue?

Translated with www.DeepL.com/Translator (free version)

Your Setup (please complete the following information):

  • Unity version: 2021.3.16f1
  • AVPro Video version (number and edition (trial/core/ultra/enterprise)): v2.8.0-ultra

berise-hayashi avatar Jun 20 '23 13:06 berise-hayashi

Are you able to share the video URL and token? You can send it over to [email protected] if you wish to keep it private.

Ste-RH avatar Jun 20 '23 13:06 Ste-RH

Thanks for the reply.

Since the current URL cannot be shared, we will prepare a server with a similar environment and send you the URL.

Please allow us a little time for this.

berise-hayashi avatar Jun 20 '23 15:06 berise-hayashi

I have just sent you the URL and authentication information for the test environment in an email with the same title as this issue.

Thank you for your cooperation.

berise-hayashi avatar Jun 20 '23 16:06 berise-hayashi

Add this: customauth

Chris-RH avatar Jun 21 '23 09:06 Chris-RH

Thank you very much. I will try it!

berise-hayashi avatar Jun 22 '23 04:06 berise-hayashi

We tested it using the method you taught us.

Windows displayed the authentication dialog and did not automatically enter the authentication information.

On Android, an error occurred and the video did not play. The following is the error message.

[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors() RenderHeads.Media.AVProVideo.MediaPlayer:Update()

Do you have any additional information?

berise-hayashi avatar Jun 22 '23 08:06 berise-hayashi

@berise-hayashi Just trying to recap.

  1. Android worked to start with, yes? So if you don't change anything then it should still work?
  2. iOS now works with the changes, yes?
  3. Windows is the one we are currently having an issue with. It is at least playing now, but it should be doing so without having to re-enter credentials.

Chris-RH avatar Jun 27 '23 09:06 Chris-RH

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 10 '23 06:08 stale[bot]

FYI.. the above is now fixed under Windows but it required implementing a new WinRT HTTP async request handler which we deemed an enhancement as opposed to a fix. To that end it will be available as part of the imminent version 3.0 release.

(Also, for future reference, pre-this enhancement the Windows security dialog appeared if no auth headers were provided, whereas the video would just fail to open if they were)

Cheers,

RichRH avatar Mar 14 '24 12:03 RichRH

This should be fixed in AVPro Video version 3.0.0. The trial version is available here for testing. Please let us know if the issue is not fixed in this version.

Chris-RH avatar Mar 25 '24 12:03 Chris-RH