Closed needz closed 5 years ago
The stream works fine for me with DefaultHttpDataSource and allowCrossProtocolRedirects enabled. Please clarify this part of what you're saying.
For OkHttpDataSource, this is basically a feature request to support cross protocol redirects, right?
@ojw28, yes, it would be great if you could include this feature in line with the HttpDataSource for those who use OkHttpDataSource.
Could you please also share your configured allowCrossProtocolRedirects line, so I can implement it on my end? Thanks.
I didn't do anything special. I did the minimum possible to enable it in the demo app, which is to change this line in the demo app to:
return new DefaultHttpDataSourceFactory(
userAgent,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
/* allowCrossProtocolRedirects= */ true);
and then I added the sample in the demo app's media.exolist.json
:
{
"name": "Test stream",
"uri": "http://tf.umutiptv.cf/dailymotion.php?kanal=tele1",
"extension": "m3u8"
},
and that was it.
It should also be noted that you can just use the https URL https://tf.umutiptv.cf/dailymotion.php?kanal=tele1
, and everything will work fine without any special configuration (because there wont be a cross protocol redirect).
@ojw28, adding the specific extension type "m3u8" worked, but imagine the situation, where a user (or a player) does not know it's an m3u8 stream after adding the original link to the playlist and it fails.
In situation, where there is no extension specified, it still doesn't work, neither adding allowCrossProtocolRedirects, nor adding https:// instead of http:// work, check these variants below.
{
"name": "Dailymotion HTTP",
"uri": "http://tf.umutiptv.cf/dailymotion.php?kanal=tele1"
},
{
"name": "Dailymotion HTTPS",
"uri": "https://tf.umutiptv.cf/dailymotion.php?kanal=tele1"
}
By the way, adding m3u8 extension definition for the URL worked in OkHttpClient without any changes. Strange.
Detecting the stream type is tracked by https://github.com/google/ExoPlayer/issues/3165.
From your response above it sounds like the OkHttp extension already performs cross-protocol redirects by default? In which case we can close this issue.
@ojw28, yes, but I guess this issue can be part of "playing PHP video" https://github.com/google/ExoPlayer/issues/5220 issue mentioned in that thread.
This issue is just a duplicate of #3165 (as #5220 may well be).
Issue description
The Dailymotion redirect URLs don't work in ExoPlayer, because it's a redirect to a real M3U8. There is also no way to set the allowCrossProtocolRedirects parameter in OkHttpDataSource, although using default DefaultHttpDataSource with allowCrossProtocolRedirects set to true didn't help either.
Reproduction steps
Use OkHttpDataSourceFactory and run the link provided in ExoPlayer 2.9.2
Link to test content
http://tf.umutiptv.cf/dailymotion.php?kanal=tele1
Version of ExoPlayer being used
ExoPlayer 2.9.2
Device(s) and version(s) of Android being used
nVidia Shield Android TV
A full bug report captured from the device