diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 170841460..45e7a2b14 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -42,6 +42,7 @@ * [Stream](rest-api/v1/virtualhost/application/stream/README.md) * [Send Event](rest-api/v1/virtualhost/application/stream/send-event.md) * [HLS Dump](rest-api/v1/virtualhost/application/stream/hls-dump.md) + * [Conclude HLS Live](rest-api/v1/virtualhost/application/stream/conclude-hls-live.md) * [ScheduledChannel](rest-api/v1/virtualhost/application/scheduledchannel-api.md) * [MultiplexChannel](rest-api/v1/virtualhost/application/scheduledchannel-api-1.md) * [Statistics](rest-api/v1/statistics/README.md) diff --git a/docs/rest-api/v1/virtualhost/application/stream/conclude-hls-live.md b/docs/rest-api/v1/virtualhost/application/stream/conclude-hls-live.md new file mode 100644 index 000000000..f77f75bd0 --- /dev/null +++ b/docs/rest-api/v1/virtualhost/application/stream/conclude-hls-live.md @@ -0,0 +1,104 @@ +# Conclude HLS Live + +For live streaming of certain events, it may be necessary to immediately stop the HLS live stream and switch to VoD after the HLS live broadcast ends. This API transitions to VoD by stopping segment updates for LL-HLS and HLS streams and inserting #EXT-X-ENDLIST. By using this API with a [Scheduled Channel](../../../../../live-source/scheduled-channel.md), you can implement additional application services. + +> ### Request + +
+ +POST v1/vhosts/{vhost}/apps/{app}/streams/{stream}:concludeHlsLive + +#### Header + +```http +Authorization: Basic {credentials} + +# Authorization + Credentials for HTTP Basic Authentication created with +``` + +#### Body + +```json +{} +``` + +
+ +> ### Responses + +
+ +200 Ok + +The request has succeeded + +#### **Header** + +``` +Content-Type: application/json +``` + +#### **Body** + +```json +{ + "statusCode": 200, + "message": "OK", +} + +# statusCode + Same as HTTP Status Code +# message + A human-readable description of the response code +``` + +
+ +
+ +400 Bad Request + +Invalid request. Body is not a Json Object or does not have a required value + +
+ +
+ +401 Unauthorized + +Authentication required + +#### **Header** + +```http +WWW-Authenticate: Basic realm=”OvenMediaEngine” +``` + +#### **Body** + +```json +{ + "message": "[HTTP] Authorization header is required to call API (401)", + "statusCode": 401 +} +``` + +
+ +
+ +404 Not Found + +The given vhost name or app name could not be found. + +#### **Body** + +```json +{ + "statusCode": 404, + "message": "Could not find the application: [default/non-exists] (404)" +} +``` + +
diff --git a/docs/rest-api/v1/virtualhost/application/stream/send-event.md b/docs/rest-api/v1/virtualhost/application/stream/send-event.md index 0459d0250..463f9cb0b 100644 --- a/docs/rest-api/v1/virtualhost/application/stream/send-event.md +++ b/docs/rest-api/v1/virtualhost/application/stream/send-event.md @@ -76,10 +76,6 @@ Content-Type: application/json { "statusCode": 200, "message": "OK", - "response": [ - "stream", - "stream2" - ] } # statusCode diff --git a/docs/streaming/hls.md b/docs/streaming/hls.md index 2b7c14ee4..6954cb9d3 100644 --- a/docs/streaming/hls.md +++ b/docs/streaming/hls.md @@ -69,12 +69,11 @@ To use HLS, you need to add the `` elements to the `` in the co ``` -| Element | Decscription | -| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Bind | Set the HTTP ports to provide HLS. | -| SegmentDuration | Set the length of the segment in seconds. Therefore, a shorter value allows the stream to start faster. However, a value that is too short will make legacy HLS players unstable. Apple recommends **6** seconds for this value. | -| SegmentCount | The number of segments listed in the playlist. 5 is recommended for HLS players. Do not set below 3. It can only be used for experimentation. | -| CrossDomains | Control the domain in which the player works through ``. For more information, please refer to the [CrossDomain](broken-reference) section. | +
ElementDecscription
BindSet the HTTP ports to provide HLS.
SegmentDurationSet the length of the segment in seconds. Therefore, a shorter value allows the stream to start faster. However, a value that is too short will make legacy HLS players unstable. Apple recommends 6 seconds for this value.
SegmentCountThe number of segments listed in the playlist. 5 is recommended for HLS players. Do not set below 3. It can only be used for experimentation.
CrossDomainsControl the domain in which the player works through <CorssDomain>. For more information, please refer to the CrossDomain section.
DVR

Enable
You can turn DVR on or off.

EventPlaylistType
Inserts #EXT-X-PLAYLIST-TYPE: EVENT into the m3u8 file.

TempStoragePath
Specifies a temporary folder to store old segments.

MaxDuration
Sets the maximum duration of recorded files in milliseconds.

+ +{% hint style="warning" %} +Safari Native Player only provides the Seek UI if `#EXT-X-PLAYLIST-TYPE: EVENT` is present. Since it is specified that nothing can be removed from the playlist when it is of type EVENT, you must call the [concludeHlsLive API](../rest-api/v1/virtualhost/application/stream/conclude-hls-live.md) to switch to VoD or terminate the stream before MaxDuration is exceeded if you use this option. Otherwise, unexpected behavior may occur in the Safari Player. +{% endhint %} ## Playback