RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

Player loop won´t end opening streaming media #1394

Open emmarojasfredini opened 1 year ago

emmarojasfredini commented 1 year ago

Describe the issue A clear and concise description of what the issue is.

Your Setup (please complete the following information):

To Reproduce

  1. Open with path or URL this media: https://s3.us-west-2.amazonaws.com/streaming-dev.sandbox.game/streaming/08591d3a-f610-4b17-a271-4072c90d3878/3213db3883d7a3924d51fc83bb2d5d7a1a4994b9bf2dde10ef28f548a3c871de/c651c791-740f-4a37-8b50-c1ac5575ac1f/c651c791-740f-4a37-8b50-c1ac5575ac1f.m3u8.
  2. Set the decryption key to: cfDacd6dC2f697FB.
  3. Use VideoAPI WinRT to be able to support encrypted sources.
  4. If the player is set to Loop=false it will work as expected, but if the player is set to Loop=true then the audio will never start.

Logs The player doesn´t log anything in Unity. It seems it never passes the opening state.

Ste-RH commented 1 year ago

Can you double check the details for the stream you provided? We have tried to play it back here according to your steps, but cannot get the stream to play.

emmarojasfredini commented 1 year ago

Hi Ste, without the loop being set you still weren´t able to make it play?

emmarojasfredini commented 1 year ago

This is the opening method I'm using to test it. The token is cfDacd6dC2f697FB and the URL https://s3.us-west-2.amazonaws.com/streaming-dev.sandbox.game/streaming/08591d3a-f610-4b17-a271-4072c90d3878/3213db3883d7a3924d51fc83bb2d5d7a1a4994b9bf2dde10ef28f548a3c871de/c651c791-740f-4a37-8b50-c1ac5575ac1f/c651c791-740f-4a37-8b50-c1ac5575ac1f.m3u8

    public void PrepareVideo(MediaPathType type, string path, string token, bool loop)
    {
        byte[] decryptionKey = System.Text.Encoding.UTF8.GetBytes(token);

#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
            videoPlayer.PlatformOptionsMacOSX.keyAuth.overrideDecryptionKey = decryptionKey;
#else
        videoPlayer.PlatformOptionsWindows.videoApi = Windows.VideoApi.WinRT;
        videoPlayer.PlatformOptionsWindows.keyAuth.overrideDecryptionKey = decryptionKey;
#endif

        videoPlayer.Loop = loop;
        videoPlayer.Events.AddListener(OnMediaPlayerEvent);

        if (!videoPlayer.OpenMedia(type, path, true))
        {
            status = AudioStatus.Failed;
        }
    }

That implementation would play with loop set to false, but will not start with loop set to true.

Ste-RH commented 1 year ago

Ok, yeah, that works now. I was setting the key in the MediaPlayer component and was not getting playback...so I think there might be an issue there as well.

Not sure why looping affects at this stage. We will investigate.

emmarojasfredini commented 1 year ago

Thanks Ste!

stale[bot] commented 1 year ago

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.

emmarojasfredini commented 1 year ago

Hi guys, we you have any update on this issue?

Chris-RH commented 1 year ago

Hi @emmarojasfredini, Apologies for the lack of an update, the team has been (and mostly still are) on holiday. I'll check where we are with this and give you an update.

Ste-RH commented 1 year ago

Can you confirm the test stream is still alive @emmarojasfredini ?

emmarojasfredini commented 1 year ago

Hi @Ste-RH ! Yes, the source should be alive, I still have it on our backend.

emmarojasfredini commented 1 year ago

Hi guys, do you have an update on this issue?

emmarojasfredini commented 1 year ago

Sorry to be this insistent, but do you have any updates on this issue?

Chris-RH commented 1 year ago

No update yet I'm afraid. When I have a free dev I will get them to look into it.

emmarojasfredini commented 1 year ago

Guys, I'm really sorry to be so bothersome. But have you got any updates?

RichRH commented 1 year ago

Hi @emmarojasfredini,

We've been looking into this issue but unfortunately can't offer a fix as of yet. What we can tell you:

The above leads us to believe this may be a lower-level issue than we can fix but will continue looking, albeit our workload is very high so don't think there will be a quick resolution - in the meantime are you maybe able to encode a blank video track alongside your audio as a workaround?

Cheers,