Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS Playback using Xamarin.Forms #155

Closed
2 of 7 tasks
BajakiGabesz opened this issue Mar 15, 2023 · 3 comments
Closed
2 of 7 tasks

HLS Playback using Xamarin.Forms #155

BajakiGabesz opened this issue Mar 15, 2023 · 3 comments

Comments

@BajakiGabesz
Copy link

BajakiGabesz commented Mar 15, 2023

🔙 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:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms
@ArchangelWTF
Copy link
Collaborator

ArchangelWTF commented Mar 16, 2023

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 added a commit to ArchangelWTF/ExoPlayerXamarin that referenced this issue Mar 16, 2023
@ArchangelWTF
Copy link
Collaborator

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

@BajakiGabesz
Copy link
Author

Thanks for your effort and sorry for just replying now. I tried it, but i had no success. In the MAUI variant, we could use the HlsMediaSource.Factory but it is not available anymore, but only for Xamarin. I know Xamarin.Forms is out of support but it would be nice to get the same behavior that the MAUI variant has.
I tried the following packages:
Xam.Plugins.Android.ExoPlayer:
2.19.1-xamarin1
2.18.10-xamarin1
2.18.9-xamarin.1

By using reflection and getting the class and Factory constructor, playing HLS works just fine, but it is not a nice solution.
Maybe i didn't do something properly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants