Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Ensure DASH media sources report bitrate changes #167

Merged
merged 3 commits into from
Jul 6, 2018

Conversation

joetimmins
Copy link
Contributor

Problem

Bitrate listeners aren't hearing any bitrate change events when playing DASH content.

Solution

When we create a DASH media source, use the given MediaSourceEventListener instance to ensure all of the noplayer listeners make it into exoplayer.

Test(s) added

There's no tests around the MediaSourceFactory class and it would be very difficult to add them.

In order to test this works, add a new BitrateChangedListener in the DemoPresenter with some logging in it. Run the demo, check Logcat to see it appear. I made this change but reverted it as I couldn't see any similar code doing anything like it.

Paired with

Given good direction by @Mecharyry

@joetimmins joetimmins added the bug label Jul 5, 2018
@joetimmins joetimmins changed the title Use given MediaSourceEventListener when creating DASH media source Ensure DASH media sources report bitrate changes Jul 5, 2018
@Mecharyry Mecharyry merged commit 43f1da8 into develop Jul 6, 2018
@Mecharyry Mecharyry deleted the use-event-listener-with-dash branch July 6, 2018 07:27
DefaultDashChunkSource.Factory chunkSourceFactory = new DefaultDashChunkSource.Factory(defaultDataSourceFactory);
DashMediaSource.Factory factory = new DashMediaSource.Factory(chunkSourceFactory, defaultDataSourceFactory);
return factory.createMediaSource(uri);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is a smell that we're applying the eventListeners at the wrong level?

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

Successfully merging this pull request may close these issues.

None yet

4 participants