Baseflow / ExoPlayerXamarin

Xamarin bindings library for the Google ExoPlayer library
https://baseflow.com
MIT License
152 stars 67 forks source link

HLS Playback using Xamarin.Forms #155

Closed BajakiGabesz closed 10 months ago

BajakiGabesz commented 1 year ago

🔙 Regression

I found the Nuget package for Xamarin.Forms and it is working quite well such as it is playing audio well in the background, but we have video support in our application as well which is based on HLS and as soon as we try to play such a video it does nothing. I checked the code and find the Dash, HLS, and SmoothStreaming support were stripped out from this version of MediaManager by commit 94e61d35 by @janwiebe-jump. I don't think it happened on purpose and may someone else also wants to use the HLS functionality. When I wanted to reactivate I got the type name Factory not found on HlsMediaSource. I think it is a kind of issue with the bindings. I am happy to help with the bindings but at this moment I don't even know where to start the investigation, so I need your guidance or if it is already done somewhere. We have to stay at Xamarin.Forms at the moment as we have multiple plugins which don't support MAUI yet and moving to MAUI takes a longer time, while without the version of Xamarin.Forms of this plugin we face with ActivityManager excessive CPU issues.

I just give it a try and it is working fine for the MAUI version.

Old (and correct) behavior

The HLS video was playing without a problem.

Current behavior

The HLS video doesn't even start.

Reproduction steps

Simply just add VideoView on a Xamarin.Froms page and use demo HLS to play, like this

Configuration

Xamarin.Forms 5.0.0.2578

Version: 1.2.4-xamarin

Platform:

ArchangelWTF commented 1 year ago

I'm currently having a look at this issue for the Xamarin branch while looking at the codebase that @janwiebe-jump (https://github.com/janwiebe-jump/XamarinMediaManager/tree/feature/2023-xamarin-android-12) has over here I'm also checking to make sure that DASH and Smoothstreaming have their respective factories as well.

The fix should not be that difficult to do so I'll apply it together with the merge to Exoplayer 2.18.3

ArchangelWTF commented 10 months ago

@BajakiGabesz Did the update I did quite some time back fix this issue?