Baseflow / ExoPlayerXamarin

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

Make DefaultMediaSourceFactory implements IMediaSourceFactory (Xamarin branch) #182

Closed jonathanantoine closed 8 months ago

jonathanantoine commented 8 months ago

:sparkles: What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Make DefaultMediaSourceFactory implements IMediaSourceFactory

:arrow_heading_down: What is the current behavior?

Its missing this interface

:new: What is the new behavior (if this is a feature change)?

I add this interface and let us customize the player by using it like this :

DefaultExtractorsFactory extractorsFactory =
    new DefaultExtractorsFactory()
        .SetMp3ExtractorFlags(Mp3Extractor.FlagEnableConstantBitrateSeeking);
var mediaSourceFactory = new DefaultMediaSourceFactory(Application.Context, extractorsFactory);
player = exoPlayerBuilder
    .SetMediaSourceFactory(mediaSourceFactory)
    ?.Build();

:boom: Does this PR introduce a breaking change?

No

:bug: Recommendations for testing

:memo: Links to relevant issues/docs

150 : MonoAndroid bindings issues: IMediaSourceFactory and DownloadService

:thinking: Checklist before submitting