-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
[REQUIRED] Issue description
When play a DASH Live stream with the MPD file configured as permanently re-direct(http status code 301/308) ExoPlayer still use the original MPD URI to re-fresh, which doesn't follow DASH IF IOP recommendation.
[REQUIRED] Reproduction steps
Use the standard Exo Demo App play a DASH LIVE stream with the MPD file configured as permanently redirect to another URI. The actual ExoPlayer behaves in following sequence:
- Make HTTP Request with URI "http://xxx/content/index.mpd"
- Server returns http status code 308 with re-directed URI to "http://xxx/content/sessionID/index.mpd"
- ExoPlayer network module will use the new address to download mpd which is all correct
... after a few seconds to re-fresh the manifest file - Make HTTP Request with URI "http://xxx/content/index.mpd"
...
The step 4 i'm afraid not following the HTTP re-direct and not follow the DASH IF IOP 4.3 chapter 3.2.15.3. Client Requirements and Recommendations:
If the HTTP request results in an HTTP redirect using a 3xx response code, the redirected URL replaces the original manifest URL
The source code in DashMediaSource::onManifestLoadCompleted is the place to handle this logic.
BTW, testing with DASH.js and Shaka-Player the re-direct handling is more aligned with DASH IOP.
I'm not quite sure if this is a BUG from your point of view. I open this as a bug mainly referring to DASH IOP spec.
[REQUIRED] Link to test content
The issue is found in production with commercial CDN and dynamic session management. Some CDN open a new session when client first requests MPD file and send back http re-direct to a new URI with sessionID there. When client doesn't follow the re-direct spec it causes CDN opening too many session and failed to server segment request.
[REQUIRED] A full bug report captured from the device
The issue is very clear and i belie you all understand the scenario.
[REQUIRED] Version of ExoPlayer being used
Test with 2.9.3 and 2.11.1 get the same behavior.
[REQUIRED] Device(s) and version(s) of Android being used
Issue can be observed from any devices.