All pages
Powered by GitBook
1 of 1

Loading...

ScheduledChannel

ScheduledChannel allows you to create a live channel by scheduling pre-recorded files has been added to OvenMediaEngine. Other services or software call this Pre-recorded Live or File Live, but OvenMediaEngine plans to expand the function to organize live channels as a source, so we named it Scheduled Channel.

ScheduledChannel can be controlled by API or file. For more information about ScheduledChannel, see below.

Scheduled Channel

The body of the API all has the same structure as the ScheduledChannel schedule file.

Get Channel List

Get all scheduled channels in the {vhost name}/{app name} application.

Request

GET /v1/vhosts/{vhost}/apps/{app}/scheduledChannels

Header

Responses

200 Ok

The request has succeeded

Header

Body

401 Unauthorized

Authentication required

Header

Body

404 Not Found

The given vhost name or app name could not be found.

Header

Body

Create Channel

Create a Scheduled channel.

Request

POST /v1/vhosts/{vhost}/apps/{app}/scheduledChannels

Header

Body

Responses

201 Created

A stream has been created.

Header

Body

400 Bad Request

Invalid request. Body is not a Json Object or does not have a required value

401 Unauthorized

Authentication required

Header

Body

404 Not Found

The given vhost name or app name could not be found.

Body

409 Conflict

A stream with the same name already exists

502 Bad Gateway

Failed to pull provided URL

500 Internal Server Error

Unknown error

Patch Schedule

Update the schedule. <Stream> cannot be PATCHed.

Request

PATCH /v1/vhosts/{vhost}/apps/{app}/scheduledChannels/{channel name}

Header

Responses

200 Ok

The request has succeeded

Header

400 Bad Request

Invalid request.

401 Unauthorized

Authentication required

Header

404 Not Found

The given vhost name or application name could not be found.

Body

Get Channel Info

Get detailed information of scheduled channel. It also provides information about the currently playing program and item.

Request

GET /v1/vhosts/{vhost}/apps/{app}/scheduledChannels/{channel name}

Header

Responses

200 Ok

The request has succeeded

Header

Body

401 Unauthorized

Authentication required

Header

Body

404 Not Found

The given vhost name or app name could not be found.

Header

Body

Delete Channel

Delete Scheduled Channel

Request

DELETE /v1/vhosts/{vhost}/apps/{app}/scheduledChannels/{channel name}

Header

Responses

200 Ok

The request has succeeded

Header

Body

401 Unauthorized

Authentication required

Header

Body

404 Not Found

The given vhost name or app name could not be found.

Header

Body

Body

Write the value you want to modify. However, name and outputProfiles cannot be modified.

Body
Body
Content-Type: application/json
Authorization: Basic {credentials}

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>
{
    "message": "OK",
    "response": [
        "stream"
    ],
    "statusCode": 200
}

# statusCode
	Same as HTTP Status Code
# message
	A human-readable description of the response code
# response
	Json array containing a list of stream names
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
Content-Type: application/json
{
    "statusCode": 404,
    "message": "Could not find the application: [default/non-exists] (404)"
}
Authorization: Basic {credentials}
Content-Type: application/json

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>
{
    "stream": {
        "name": "stream2",
        "bypassTranscoder": false,
        "videoTrack": true,
        "audioTrack": true
    },
    "fallbackProgram": {
        "items": [
            {
                "url": "file://video/sample.mp4",
                "start": 0,
                "duration": 60000
            }
        ]
    },
    "programs": [
        {
            "name": "1",
            "scheduled": "2023-11-13T20:57:00.000+09",
            "repeat": true,
            "items": [
                {
                    "url": "file://video/sample.mp4",
                    "start": 0,
                    "duration": 60000
                },
                {
                    "url": "file://video/1.mp4",
                    "start": 0,
                    "duration": 60000
                }
            ]
        },
        {
            "name": "2",
            "scheduled": "2023-11-14T20:57:00.000+09",
            "repeat": true,
            "items": [
                {
                    "url": "file://1.mp4",
                    "start": 0,
                    "duration": 60000
                },
                {
                    "url": "file://sample.mp4",
                    "start": 0,
                    "duration": 60000
                }
            ]
        }
    ]
}
Content-Type: application/json
{
    "message": "Created",
    "statusCode": 201
}

# statusCode
    Same as HTTP Status Code
# message
    A human-readable description of the response code
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
{
    "statusCode": 404,
    "message": "Could not find the application: [default/non-exists] (404)"
}
Authorization: Basic {credentials}

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>
Content-Type: application/json
{
    "message": "[HTTP] Cannot change [name] using this API (400)",
    "statusCode": 400
}
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
    "message": "[HTTP] Could not find the application: [default/app2] (404)",
    "statusCode": 404
}
Authorization: Basic {credentials}

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>
Content-Type: application/json
{
    "message": "OK",
    "response": {
        "currentProgram": {
            "currentItem": {
                "currentPosition": 1700,
                "duration": 60000,
                "start": 0,
                "url": "file://video/1.mp4"
            },
            "duration": -1,
            "end": "2262-04-12T08:47:16.854+09:00",
            "name": "2",
            "repeat": true,
            "scheduled": "2023-11-20T20:57:00.000+09:00",
            "state": "onair"
        },
        "fallbackProgram": {
            "items": [
                {
                    "duration": -1,
                    "start": 0,
                    "url": "file://hevc.mov"
                },
                {
                    "duration": -1,
                    "start": 0,
                    "url": "file://avc.mov"
                }
            ],
            "name": "fallback",
            "repeat": true,
            "scheduled": "1970-01-01T00:00:00Z"
        },
        "programs": [
            {
                "name": "2",
                "repeat": true,
                "scheduled": "2023-11-20T20:57:00.000+09"
            }
        ],
        "stream": {
            "audioTrack": true,
            "bypassTranscoder": false,
            "name": "stream",
            "videoTrack": true
        }
    },
    "statusCode": 200
}
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
Content-Type: application/json
{
    "statusCode": 404,
    "message": "Could not find the application or stream (404)"
}
Authorization: Basic {credentials}

# Authorization
    Credentials for HTTP Basic Authentication created with <AccessToken>
Content-Type: application/json
{
	"statusCode": 200,
	"message": "OK",
}


# statusCode
	Same as HTTP Status Code
# message
	A human-readable description of the response code
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
Content-Type: application/json
{
    "message": "[HTTP] Could not find the stream: [default/#default#app/stream] (404)",
    "statusCode": 404
}
{
    "fallbackProgram": {
        "items": [
            {
                "url": "file://video/sample.mp4",
                "start": 5000,
                "duration": 30000
            }
        ]
    },
    "programs": [
        {
            "name": "1",
            "scheduled": "2023-11-10T20:57:00.000+09",
            "repeat": true,
            "items": [
                {
                    "url": "file://video/1.mp4",
                    "start": 0,
                    "duration": 60000
                }
            ]
        },
        {
            "name": "2",
            "scheduled": "2023-11-20T20:57:00.000+09",
            "repeat": true,
            "items": [
                {
                    "url": "file://video/1.mp4",
                    "start": 0,
                    "duration": 60000
                },
                {
                    "url": "file://video/sample.mp4",
                    "start": 0,
                    "duration": 60000
                }
            ]
        }
    ]
}
{
    "message": "Created",
    "statusCode": 201
}
{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}