RenderHeads / UnityPlugin-AVProVideo

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

Video not loading from buffer on iOS #1412

Closed sv955 closed 1 year ago

sv955 commented 1 year ago

Loading video from buffer is not working on iPad

Video file loaded using 'OpenMedia' method is working

var path = Path.Combine(Application.streamingAssetsPath, "1.mp4"); _mediaPlayer.OpenMedia(new MediaPath(path, MediaPathType.AbsolutePathOrURL), false);

Video file loaded using 'OpenMediaFromBuffer' method is not working

var path = Path.Combine(Application.streamingAssetsPath, "1.mp4"); var data = File.ReadAllBytes(path); _mediaPlayer.OpenMediaFromBuffer(data, false);

Unity Version - 2020.3.42f1 iOS version - 16 AVPro version - 2.6.7

To replicate issue download sample project -[redacted - please don't post projects here]

Chris-RH commented 1 year ago

What device are you using? What are the specs of the media are you using? Have you tried different media/source? Is MediaPlayerEvent.EventType.FinishedBuffering being called?

sv955 commented 1 year ago

What device are you using? iPad Air and iPad pro

What are the specs of the media are you using? Media specs = Video is from AV Pro sample videos (Working with 'OpenMedia' method)

Have you tried different media/source? Yes. _mediaPlayer.OpenMedia(new MediaPath(path, MediaPathType.AbsolutePathOrURL), false); is working

Is MediaPlayerEvent.EventType.FinishedBuffering being called? No

Ste-RH commented 1 year ago

Opening/playing a video from a buffer (OpenMediaFromBuffer) is not supported on any platform other than Windows at this time.

sv955 commented 1 year ago

@Ste-RH Any plans of releasing this feature in upcoming version?

I need to play an encrypted video file. I was thinking to decrypt the byte data first and then load it but since 'loading from buffer' is not supported on iOS, could you please suggest any workaround for the same

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.

sv955 commented 1 year ago

@Ste-RH @Chris-RH

Any plans of releasing this feature in upcoming version?

I need to play an encrypted video file. I was thinking to decrypt the byte data first and then load it but since 'loading from buffer' is not supported on iOS, could you please suggest any workaround for the same

Chris-RH commented 1 year ago

If you need encryption, HLS is about about the only thing we can think of.