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

Default video access cannot be played after Android 8 #40

Closed
MinosPong opened this issue Jul 1, 2019 · 3 comments
Closed

Default video access cannot be played after Android 8 #40

MinosPong opened this issue Jul 1, 2019 · 3 comments

Comments

@MinosPong
Copy link

MinosPong commented Jul 1, 2019

I found the following error log when running in the emulator.
Pixel 2 API 29 - Android 9.+
I think this is due to some restriction introduced after android 8. See
https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted

2019-07-01 16:48:33.175 4984-5723/com.daasuu.exoplayerfilter E/ExoPlayerImplInternal: Source error.
    com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect to http://www.html5videoplayer.net/videos/toystory.mp4
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:194)
        at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:147)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:844)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:320)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
     Caused by: java.io.IOException: Cleartext HTTP traffic to www.html5videoplayer.net not permitted
        at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:124)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:429)
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:350)
        at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:192)
@MinosPong
Copy link
Author

Tried with another mp4 used in ExoPlayer and it is working. Suggest updating the default video.
https://html5demos.com/assets/dizzy.mp4

@MasayukiSuda
Copy link
Owner

thx. I fix it. please try again.

@MinosPong
Copy link
Author

Thanks. @ 7f30dd1

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