Results for:

Suppor Center

LIVE API

LIVE

Create Live Event

Create Live Event

This method permits to create a new live event.

The command returns:

contentId: event code of the event
title: event's title
description: event's description
Note: event's notes
startDate: start date of the event
endDate: end date of the event

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventCreate>
        <token>MY_API_KEY</token>
        <title>title</title>
        <description>description</description>
        <note>Notes</note>
        <utcStartDate>Start date</utcStartDate>
        <utcEndDate>End date</utcEndDate>
    </LiveEventCreate
                
{
    "token": "MY_API_KEY",
    "title": "title",
    "description": "description",
    "note": "Notes",
    "utcStartDate": "Start date",
    "utcEndDate": "End date"
}
                

Parameters

token Specify your MainStreaming API KEY
title Specify event title
description Specify event description
note Specify event notes
utcStartDate Specify start date and time of the event (format in yyyyMMddHHmmss)
utcEndDate Specify end date and time of the event (format in yyyyMMddHHmmss)

Response:

<LiveEventDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <contentId>1234567</contentId>
    <isRecording>false</isRecording>
    <title>Title</title>
    <description>Description</description>
    <note>note</note>
    <utcStartDate>20151025155900</utcStartDate>
    <utcEndDate>20151075155900</utcEndDate>
<ArrayOfVodCategory>
                
{
    "contentId": "1234567",
    "isRecording": false,
    "title": "Title",
    "description": "Description",
    "note": "note",
    "utcStartDate": "20151025155900",
    "utcEndDate": "20151075155900"
}
                        

Create Live Event Source

Create Live Event Source

The method permits to create a RTMP source.

Command returns:

idLiveEventSource: id source
rtmpLink: rtmp link that you have to use for transmission
description: assigned source name

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventSourceCreate>
        <token>MY_API_KEY</token>
        <description>Description</description>
    </LiveEventSourceCreate
                
{
    "token": "MY_API_KEY",
    "description": "Description"
}
                

Parameters

token Specify your MainStreaming API KEY
description Specify source description
You have to use Start and Limit to obtain paginated results.

Response:

<LiveEventSourceDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <idLiveEventSource>1</idLiveEventSource>
        <rtmpLink>rtmpLink</rtmpLink>
        <description>description</description>
<LiveEventSourceDTO>
                
{
    "idLiveEventSource":"1",
    "rtmpLink": "rtmpLink",
    "description": "description"
}
                        

Assign Live Event Source

Assign Live Event Source

The LiveEventSourceAssign method permits to assign an existing source to the live event

Command returns

true for successfully assigned source
false for error

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventSourceAssign>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
        <idLiveEventSource>idLiveEventSource</idLiveEventSource>
    </LiveEventSourceAssign
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId",
    "idLiveEventSource": "idLiveEventSource"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify the contentId of the event
idLiveEventSource Specify the id of the source

Archive Event

Archive Event

LiveEventArchive method permits to archive a live event.

The method returns a boolean: true for command executed correctly, false for error.

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventArchive>
        <token>MY_API_KEY</token>
        <contentId>ContentID</contentId>
    </LiveEventArchive
                
{
    "token": "MY_API_KEY",
    "contentId": "ContentID"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify the live event contentID

Live Event List

Live Event List

The method LiveEventList returns the list of the live events.

The command returs a list of LiveEventDTO elements that contains

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventList>
        <token>MY_API_KEY</token>
    </LiveEventList
                
{
    "token": "MY_API_KEY"
}
                

Parameters

token Specify your MainStreaming API KEY

Response:

<LiveEventDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <idLiveEvent>1</idLiveEvent>
    <contentId>contentId</contentId>
    <isRecording>false</isRecording>
    <title>title</title>
    <decription>decription</decription>
    <note>note</note>
    <startDate>Start Date</startDate>
    <endDate>End Date</endDate>
</LiveEventDTO
                
{
    "idLiveEvent": "1",
    "contentId": "contentId",
    "isRecording": false,
    "title": "title",
    "decription": "decription",
    "note": "note",
    "startDate": "Start Date",
    "endDate": "End Date"
}
                

Live Event Update

Live Event Update

This method permits to update a live event.

The command returns:

true for success
false for error

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventUpdate>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
        <newTitle>title</newTitle>
        <newDescription>description</newDescription>
        <newNote>Notes</newNote>
        <newUtcStartDate>Start date</newUtcStartDate>
        <newUtcEndDate>End date</newUtcEndDate>
    </LiveEventUpdate
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId",
    "newTitle": "title",
    "newDescription": "description",
    "newNote": "Notes",
    "newUtcStartDate": "Start date",
    "newUtcEndDate": "End date"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentId of the event
newTitle Specify event title
newDescription Specify event description
newNotes Specify event notes
newUtcStartDate Specify start date and time of the event (format in yyyyMMddHHmmss)
newUtcEndDate Specify end date and time of the event (format in yyyyMMddHHmmss)

Live Event Delete

Live Event Delete

This method permits to delete a live event.

The command returns:

true for success
false for error

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventDelete>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
    </LiveEventDelete
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentId of the event

Live Event Sources List

Live Event Sources List

The command LiveEventSourceList returns the list of streaming sources

The LiveEventSourceDTO elements contain:

rtmpLink: rtmp link to use for streaming
idLiveEventSource: id of the source
description: description assigned to the source

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventSourceList>
        <token>MY_API_KEY</token>
    </LiveEventSourceList>
                
{
    "token": "MY_API_KEY"
}
                

Parameters

token Assigned MainStreaming API

Response:

<ArrayOfLiveEventSourceDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <LiveEventSourceDTO>
        <idLiveEventSource>1</idLiveEventSource>
        <rtmpLink>rtmpLink</rtmpLink>
        <description>description</description>
    </LiveEventSourceDTO>
<ArrayOfLiveEventSourceDTO>
                
[
    {
        "idLiveEventSource":"1",
        "rtmpLink": "rtmpLink",
        "description": "description"
    }
]
                        

Live Event Source Update

Live Event Source Update

This method permits to update a live event source description.

The command returns:

true for success
false for error

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventSourceUpdate>
        <token>MY_API_KEY</token>
        <idLiveEventSource>contentId</idLiveEventSource>
        <newDescription>description<newDescription>
    </LiveEventSourceUpdate>
                
{
    "token": "MY_API_KEY",
    "idLiveEventSource": "contentId",
    "newDescription": "description"
}
                

Parameters

token MainStreaming API's key
idLiveEventSource Specify id of the event source
newDescription Specify event source description

Live Event Source Delete

Live Event Source Delete

This method permits to delete a live source.

The command returns:

true for success
false for error

Request

Post:
<?xml version="1.0" encoding="utf-8" ?>
    <LiveEventSourceDelete>
        <token>MY_API_KEY</token>
        <idLiveEventSource>idLiveEventSource</idLiveEventSource>
    </LiveEventSourceDelete
                
{
    "token": "MY_API_KEY",
    "idLiveEventSource": "idLiveEventSource"
}
                

Parameters

token Specify your MainStreaming API KEY
idLiveEventSource Specify the id of the source

Start Event Recording

Start Event Recording

The method LiveEventStartRecord permits to record a live event

The command returns:

true for success
false for error

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventStartRecord>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
    </LiveEventStartRecord>
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentID of the live event

Stop Event Recording

Stop Event Recording

The method LiveEventStopRecord permits to stop recording a live event

The command returns:

true for success
false for error

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventStopRecord>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
    </LiveEventStopRecord>
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentID of the live event

Pause Event Recording

Pause Event Recording

The method LiveEventPauseRecord permits to pause the recording of a event.

The difference with LiveEventStopRecord is that you can recall LiveEventStartRecord and this command append the registration to the old one.

It returns:

true for recording paused
false for error

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventPauseRecord>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
    </LiveEventPauseRecord>
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentID of the live event

Get Live Event Realtime Statistics

Get Live Event Realtime Statistics

This method permits to retrieve the stats of your event.

The command returns:

IsOnline for the live state (online/offline)
IsArchived if the event was archived
ConnectedClients is the number of users connected simultaneously
TotalClients is the number of users that watched the event

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventGetStats>
        <token>MY_API_KEY</token>
        <contentIdLiveEvent>contentId</contentIdLiveEvent>
    </LiveEventGetStats>
                
{
    "token": "MY_API_KEY",
    "contentIdLiveEvent": "contentId"
}
                

Parameters

token Specify your MainStreaming API KEY
contentIdLiveEvent Specify contentID of the live event

Response:

<LiveEventStatsDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <ContentId>1234567</ContentId>
        <IsOnline>true</IsOnline>
        <IsArchived>false</IsArchived>
        <ConnectedClients>42</ConnectedClients>
        <TotalClients>5012</TotalClients>
<LiveEventSourceDTO>
                
{
    "ContentId": "1234567",
    "IsOnline": true,
    "IsArchived": false,
    "ConnectedClients": 42,
    "TotalClients": 5012
}
                        

Create Live event cuepoint

Create Live event cuepoint

The LiveEventCreateCuePoint method is an advanced call to create a cuepoint in a live event.

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventCreateCuePoint>
        <token>MY_API_KEY</token>
        <contentId>contentId</contentId>
        <idAssigned>idAssigned</idAssigned>
    </LiveEventCreateCuePoint>
                
{
    "token": "MY_API_KEY",
    "contentId": "contentId",
    "idAssigned": "idAssigned"
}
                

Parameters

token Specify your MainStreaming API KEY
contentId Specify contentID of the live event
idAssigned Assign a label to cuepoint, it will be returned to javascript to permits you to do matching
For using correctly the cuepoints, please take a read to Javascript's embed guide and how to use listeners on Embed section.

List live event cuepoints

List live event cuepoints

This method returns a list of active cuepoints on a live event.

Request

Post:
<?xml version=\"1.0\" encoding=\"utf-8\" ?>
    <LiveEventListCuePoints>
        <token>MY_API_KEY</token>
        <contentIdLiveEvent>contentId</contentIdLiveEvent>
        <lastIdCuePoint>lastIdCuePoint</lastIdCuePoint>
    </LiveEventListCuePoints>
                
{
    "token": "MY_API_KEY",
    "contentIdLiveEvent": "contentId",
    "lastIdCuePoint": "lastIdCuePoint"
}
                

Parameters

token Specify your MainStreaming API KEY
contentIdLiveEvent Specify contentID of the live event
lastIdCuePoint Optional parameter that permits to obtain all the cuepoint over the last id readed

Response:

<CuePointDTO xmlns="http://schemas.datacontract.org/2004/07/Mainsoft.Streaming.Sdk._13.model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <idAssigned>A1</idAssigned>
        <contentId>contentId</contentId>
        <utcDate>20160101180000</utcDate>
        <idCuePoint>1</idCuePoint>
<CuePointDTO>
                
{
    "idAssigned": "A1",
    "ContentId": "1234567",
    "utcDate": "20160101180000",
    "idCuePoint": 1
}
                        
For using correctly the cuepoints, please take a read to Javascript's embed guide and how to use listeners on Embed section.
keyboard_arrow_up