Skip to main content

GET Audio Player HTML Page

Overview


The following table contains important information about the GET method in regards to receiving the audio player HTML page.

GET Audio Player HTML Page
MethodGET
URL or Endpoint/audio-player/playerId/audioId.html
HeadersNot Applicable
ParametersplayerId, audioId, startEpisode
BodyNot Applicable

The description of the URL parameters is as follows:

URL Parameter NameMandatoryTypeDescription
playerIdYesstringUnique Id of the audio player.
audioIdYesstringUnique Id of the audio.
startEpisodeNostring (query)The episode to start playback from (used for podcasts).

Request Body

The request does not contain a request body

Response

Returns text/html content containing a full HTML page with the embedded audio player. The page includes Open Graph and Twitter Card meta tags for social sharing, along with the player initialization script.

<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta property='og:url' content='https://vp.gjirafa.net/audio-player/{playerId}/{audioId}'>
<meta property='og:title' content='{title}'>
<meta property='og:image' content='{thumbnail}'>
<meta property='og:type' content='music.song'>
<style type='text/css'>
#player_{audioId}_{playerId}_div {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
</style>
</head>
<body>
<div><div id='player_{audioId}_{playerId}_div'></div></div>
<script>
(function () {
var head = document.head;
var script;
function setupPlayer() {
if (script) return;
script = document.createElement('script');
script.async = 1;
script.src = 'https://vp.gjirafa.net/audio-player/{playerId}/{audioId}.js';
head.appendChild(script);
}
window.addEventListener('load', function () {
setTimeout(function () { setupPlayer(); }, 100);
})
})();
</script>
</body>
</html>

If the action is successful, the service sends back an HTTP 200 or 201 response.

Errors

For information about the errors that are common to all actions, see Common Errors:

  • HTTP Status Code 400: Bad Request

  • HTTP Status Code 401: Unauthorized

  • HTTP Status Code 403: Forbidden

  • HTTP Status Code 404: Result Not Found

  • HTTP Status Code 500: Internal Server Error

  • HTTP Status Code 503: Backend Fetch Failed