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

Report url after redirection to application event listeners #2054

Closed
vishveshdk opened this issue Nov 10, 2016 · 8 comments
Closed

Report url after redirection to application event listeners #2054

vishveshdk opened this issue Nov 10, 2016 · 8 comments
Assignees

Comments

@vishveshdk
Copy link

vishveshdk commented Nov 10, 2016

Does ExoPlayer provide the IP Address of the server that delievered the media Segment? Similar issue was raised previous in the following bug: #2028

I have used the latest version of ExoPlayer with HLS stream, it does not return the IP address of the Server. The IP address is useful in identify server delivering data. Quite useful to track the source of rebuffer etc.

iOS has MPMovieAccessLogEvent and AVPlayerItemAccessLogEvent, which provide server IP Address. Are there any plan to provide this information?

@vishveshdk vishveshdk changed the title Edge Server IP Address IP Address of the server that delivered the media segment Nov 10, 2016
@ojw28
Copy link
Contributor

ojw28 commented Nov 10, 2016

I'm not sure HttpUrlConnection exposes a way of getting the IP address at the platform level. Do you really need the actual IP address, or is the URL after redirection sufficient?

@vishveshdk
Copy link
Author

Actual IP address would be great. With CDNs being used it would help in identifying problem causing server.
Everytime ExoPlayer downloads a segment, it could pass on the IP address of the server supplying the segment as part of Format class.

@ojw28
Copy link
Contributor

ojw28 commented Nov 10, 2016

I understand what you're trying to do. I'm saying the actual IP address doesn't appear to be exposed by the underlying network stack, which is why I'm asking whether the URL after redirection is sufficient.

The CDN I have most experience working with redirects to URLs that are machine specific, so having the resolved URL would be fine. I suspect most (all?) CDNs do this, and if so the resolved URL should be fine for your purposes. Can you confirm whether or not this is the case?

@vishveshdk
Copy link
Author

I understand now, It should be good enough.

@ojw28 ojw28 changed the title IP Address of the server that delivered the media segment Report url after redirection to application event listeners Nov 16, 2016
@ojw28
Copy link
Contributor

ojw28 commented Nov 16, 2016

Updated the title to reflect the enhancement we'll provide for this.

  • The URL after redirection will be reported through AdaptiveMediaSourceEventListener's onLoadCompleted method, and possibly onLoadCanceled and onLoadError in the case that the cancelation or error occurs after the connection has been established.
  • We may also want to report the URL after redirection via something in ExtractorMediaSource.EventListener.

@ojw28 ojw28 assigned tonihei and unassigned ojw28 Jun 6, 2018
@ojw28
Copy link
Contributor

ojw28 commented Jun 6, 2018

Reassigning to @tonihei as this is (primarily) analytics related.

@tonihei
Copy link
Collaborator

tonihei commented Jun 7, 2018

That's relatively easy to implement. @ojw28's comment above is a little bit outdated as we made some changes to the media source event reporting.

The updated version is:

  • The URL after redirection will be reported through MediaSourceEventListener's callbacks (as above in onLoadCompleted and if applicable also in onLoadCanceled and onLoadError ).
  • The URl will be a new additional field in the LoadEventInfo parameter.

ojw28 pushed a commit that referenced this issue Jun 22, 2018
Both values are helpful for event reporting, but are only available while
the data source is open. Similar to bytesLoaded, they need to be reported
through the Chunk.

Issue:#2054
Issue:#4361

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201664907
ojw28 pushed a commit that referenced this issue Jun 28, 2018
This url is readily available when creating media source events (from the
data source) but so far not published to external listeners. This change
adds a new field to LoadEventInfo which corresponds to DataSource.getUri().

Issue:#2054

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202459049
@tonihei
Copy link
Collaborator

tonihei commented Jul 4, 2018

Closing as the requested info is now part of the MediaSourceEventListener callbacks.

@tonihei tonihei closed this as completed Jul 4, 2018
@google google locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants