An organization
Bucket(s)
One or more video files
All GraphQL queries and mutations related to CPL markers require the internal ID of the file(s) being operated on.
To add markers to the file specified by fileId
, you can use the createCplMarkers
mutation. Note that the markers already present on the CPL are kept.
If the CPL is invalid in any way, the mutation could throw an error unrelated to the added markers. This is due to the fact that Connect always processes the CPL as a whole, it never partially reads/writes it.
mutation CreateCplMarkers($fileId: ID!, $markers: [CplMarkerInput!]!) {createCplMarkers(fileId: $fileId, markers: $markers) {markers {offsetlabel}}}
{"fileId": "f3609375-3d8c-4cf6-abd3-0d3518df75b7","markers": [{"label": "FFBT","offset": 1},{"label": "FFEC","offset": 10}]}
Assuming that the specified file didn't have any markers before the mutation, the result will be:
{"createCplMarkers": {"markers": [{"label": "FFBT","offset": 1},{"label": "FFEC","offset": 10}]}}
To delete existing CPL markers, you can use the deleteCplMarkers
mutation. When used, it deletes all markers of the file specified by fileId
.
If the CPL is invalid in any way, the mutation could throw an error unrelated to the added markers. This is due to the fact that Connect always processes the CPL as a whole, it never partially reads/writes it.
mutation DeleteCplMarkers($fileId: ID!) {deleteCplMarkers(fileId: $fileId) {markers {offsetlabel}}}
{"fileId": "f3609375-3d8c-4cf6-abd3-0d3518df75b7"}
The resulting CPL will not have any markers, so the result must always be:
{"deleteCplMarkers": {"markers": []}}
Validations related to markers happen every time someone changes a CPL, even if the changes are not related to markers.
Here are the most common error messages:
offsets must be non-negative
<marker-offset>
) not allowed."{"offset": -2,"label": "FFBT"}
offsets must be less than the CPL duration
<marker-offset>
, biggest possible offset: <CPL-duration - 1>
."[{"offset": 5,"label": "FFBT"},{"offset": 6,"label": "FFBT"}]
Assuming the duration of the CPL is 5, both markers are invalid because the offset must be strictly smaller than the duration.