amazon-ivs-player-web-sample icon indicating copy to clipboard operation
amazon-ivs-player-web-sample copied to clipboard

Possibility to intercept request

Open Carel155 opened this issue 3 years ago • 2 comments

Is there a possibility to intercept request in Amazon IVS player? For example videojs allows before request:

videojs.Hls.xhr.beforeRequest = function(options) {
  /*
   * Modifications to requests that will affect every player.
   */

  return options;
};

Using IVS player with videojs the beforeRequest is never called as i expect IVS player makes requests separate of videojs.

Use case would be adding cloudfront signed url params in order to get private VOD.

Carel155 avatar Nov 04 '21 19:11 Carel155

Hey @Carel155, the setRequestCredentials API introduced with v1.4.0 may solve your use case: https://aws.github.io/amazon-ivs-player-docs/1.4.0/web/interfaces/player.html#setrequestcredentials

tonyjin avatar Nov 04 '21 19:11 tonyjin

Hey, thanks for the quick response. Yeah, the setRequestCredentials would probably solve the problem in web (even though it would be much more complicated as it should be). But there is no solutions for android and iOS packages as i understand correctly?

Carel155 avatar Nov 04 '21 20:11 Carel155