Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@udnisap
Copy link
Contributor

@udnisap udnisap commented Jul 8, 2019

#1706 Description

content:// uris will be routed from DefaultDataSourceFactory in Android

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • [ x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@udnisap
Copy link
Contributor Author

udnisap commented Jul 8, 2019

Does it make sense to flip the condition here

if (isFileOrAsset(uri)) {
dataSourceFactory = new DefaultDataSourceFactory(context, "ExoPlayer");
} else {
dataSourceFactory =
new DefaultHttpDataSourceFactory(
"ExoPlayer",
null,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
true);
}

to use DefaultDataSourceFactory by default and DefaultHttpDataSourceFactory on http or https?

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. The fix looks good. Just need to update the changelog and pubspec with a new version.

@cyanglaz
Copy link
Contributor

cyanglaz commented Jul 18, 2019

Does it make sense to flip the condition here

if (isFileOrAsset(uri)) {
dataSourceFactory = new DefaultDataSourceFactory(context, "ExoPlayer");
} else {
dataSourceFactory =
new DefaultHttpDataSourceFactory(
"ExoPlayer",
null,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
true);
}

to use DefaultDataSourceFactory by default and DefaultHttpDataSourceFactory on http or https?

I think you are right. We can get rid of the isFileOrAsset and make it something like isHTTP. Do you mind to do this change?

@udnisap udnisap force-pushed the support-for-content-uris-in-video-player-plugin branch from d5e1fd7 to 391e3b2 Compare July 29, 2019 08:26
@udnisap udnisap requested a review from iskakaushik as a code owner July 29, 2019 08:26
Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

Did another review, overall it looks good. Left some comments!
And the CI seems not happy with the formatting, could you also fix that?

@cyanglaz cyanglaz self-assigned this Aug 6, 2019
@udnisap udnisap force-pushed the support-for-content-uris-in-video-player-plugin branch 2 times, most recently from df91885 to d9f6841 Compare August 15, 2019 19:26
-- all http and https uris will be routed to DefaultHttpDataSourceFactory
-- everything else will use DefaultMediaSource
@udnisap udnisap force-pushed the support-for-content-uris-in-video-player-plugin branch from d9f6841 to 74d2c21 Compare August 15, 2019 19:49
Copy link
Contributor

@iskakaushik iskakaushik left a comment

Choose a reason for hiding this comment

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

LGTM

@udnisap
Copy link
Contributor Author

udnisap commented Sep 3, 2019

@cyanglaz does everything looks good to you?

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@cyanglaz cyanglaz merged commit 163bbec into flutter:master Sep 4, 2019
noelmansour pushed a commit to snowble/plugins that referenced this pull request Nov 13, 2019
content:// uris will be routed from DefaultDataSourceFactory in Android
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
content:// uris will be routed from DefaultDataSourceFactory in Android
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
content:// uris will be routed from DefaultDataSourceFactory in Android
@udnisap udnisap deleted the support-for-content-uris-in-video-player-plugin branch December 19, 2019 18:17
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.

4 participants