It appears that the setMedia
method does not include a headers property, so the provided code will not function correctly.
In order to assign headers to a jPlayer instance, it is necessary to utilize the jPlayer
method to establish headers for the entire player instead of for individual media files. To accomplish this, you can employ the option
method to define the headers property for the player as follows:
const httpHeader = { 'authorization' : '123445'};
$(this).jPlayer('option', 'headers', new Headers(httpHeader));
This action will apply the specified headers to the player instance, ensuring they are implemented across all loaded media files within the player.