update-osd
Use the interface to edit the GFX.
Request Mode
POST http://ip/mwapi/update-osd
Parameter | Description |
---|---|
osdId | The GFX ID |
fileName | The file name |
md5 | The MD5 value of the file |
fixed | Whether it is a template layer. 0: No 1: Yes |
sourceType | The source type. 10: GFX |
x | srcWindow.x, 0~1000000 |
y | srcWindow.y, 0~1000000 |
width | srcWindow.width, 0~1000000 |
height | srcWindow.height, 0~1000000 |
alpha | The opacity value. Range: [0 - 1000000] |
secondaryType | 4: picture 5: text |
text | The text content, required for text GFX |
textAlignment | The text alignment, required for text GFX TEXT_ALIGNMENT_LEFT = 0, TEXT_ALIGNMENT_CENTER = 1, TEXT_ALIGNMENT_RIGHT = 2 |
textColor | The text color, required for text GFX |
fontSize | The font size, required for text GFX |
fontFamily | The font family, required for text GFX |
glyph | The text glyph, required for text GFX FONT_GLYPH_NONE = 0x0, FONT_GLYPH_ITALICS = (0x1LL << 1), FONT_GLYPH_UNDERLINE= (0x1LL << 2), FONT_GLYPH_BOLD= (0x1LL << 3) |
strokeColor | The stroke color of text, which is the required parameter of text GFX. |
strokeWidth | The stroke width of text, which is the required parameter of text GFX. |
scaleX | The scaling ratio of X-axis. Range: [0 - 1000000] |
scaleY | The scaling ratio of Y-axis. Range: [0 - 1000000] |
{
"layerList":[
{
"fileName":"20230113101518294.png",
"md5":"01b0f9f65ac74dafa1efd6804e69d743",
"sourceType":10,
"x":348438,
"y":100926,
"scaleX":1030000,
"scaleY":1030000,
"width":303646,
"height":795370,
"alpha":1000000,
"secondaryType":4,
"text":"",
"fontFamily":"sans-serif",
"textColor":0,
"strokeColor":0,
"strokeWidth":0,
"fontSize":14,
"glyph":0,
"textAlignment":0,
"fixed":0
},
{
"fileName":"20230113101532689",
"md5":"c53665770176e8b4a60297419c586757",
"sourceType":10,
"x":630729,
"y":811111,
"scaleX":1000000,
"scaleY":1000000,
"width":232292,
"height":77778,
"alpha":1000000,
"secondaryType":5,
"text":"Input text here",
"fontFamily":"sans-serif",
"textColor":16711680,
"strokeColor":65280,
"strokeWidth":1,
"fontSize":26,
"glyph":0,
"textAlignment":0,
"fixed":0
}
],
"osdId":108
}
Response Body
JSON structure is as follows:
{
"info":{
"audioList":[
],
"bgLayer":{
"alpha":1000000,
"cropWindow":{
"height":1000000,
"type":0,
"width":1000000,
"x":0,
"y":0
},
"fixed":0,
"flip":0,
"frame":{
"color":0,
"width":0
},
"givenBg":0,
"mediaProgress":0,
"pdfPosition":0,
"pdfScaleMode":3,
"pdfScaleValue":10000,
"rotation":0,
"scaleX":1000000,
"scaleY":1000000,
"sourceColor":255,
"sourceDuration":0,
"sourceHeight":0,
"sourceId":0,
"sourceThumbHeight":0,
"sourceThumbWidth":0,
"sourceTotalPageNumber":0,
"sourceType":12,
"sourceWidth":0,
"srcWindow":{
"height":1000000,
"width":1000000,
"x":0,
"y":0
},
"videoPolicy":0,
"videoPolicyIn":0,
"videoPolicyNextScene":0,
"videoPolicyOut":0,
"videoRangeEnd":0,
"videoRangeStart":0,
"webScaleValue":10000,
"window":{
"height":1000000,
"width":1000000,
"x":0,
"y":0
}
},
"dividerLine":{
"color":0,
"width":0,
"x1":500000,
"x2":500000,
"y1":0,
"y2":1000000
},
"id":108,
"layerList":[
{
"alpha":1000000,
"cropWindow":{
"height":1000000,
"type":1,
"width":1000000,
"x":0,
"y":0
},
"fixed":0,
"flip":0,
"frame":{
"color":16777215,
"width":0
},
"givenBg":0,
"mediaProgress":0,
"pdfPosition":0,
"pdfScaleMode":3,
"pdfScaleValue":10000,
"rotation":360,
"scaleX":1030000,
"scaleY":1030000,
"sourceColor":255,
"sourceDuration":0,
"sourceHeight":292,
"sourceId":2029,
"sourceThumbHeight":377,
"sourceThumbWidth":256,
"sourceTotalPageNumber":0,
"sourceType":10,
"sourceWidth":198,
"srcWindow":{
"height":1000000,
"width":1000000,
"x":0,
"y":0
},
"videoPolicy":0,
"videoPolicyIn":0,
"videoPolicyNextScene":0,
"videoPolicyOut":0,
"videoRangeEnd":0,
"videoRangeStart":0,
"webScaleValue":10000,
"window":{
"height":795370,
"width":303646,
"x":348438,
"y":100926
}
},
{
"alpha":1000000,
"cropWindow":{
"height":1000000,
"type":1,
"width":1000000,
"x":0,
"y":0
},
"fixed":0,
"flip":0,
"frame":{
"color":16777215,
"width":0
},
"givenBg":0,
"mediaProgress":0,
"pdfPosition":0,
"pdfScaleMode":3,
"pdfScaleValue":10000,
"rotation":360,
"scaleX":1000000,
"scaleY":1000000,
"sourceColor":255,
"sourceDuration":0,
"sourceHeight":85,
"sourceId":2033,
"sourceThumbHeight":46,
"sourceThumbWidth":256,
"sourceTotalPageNumber":0,
"sourceType":10,
"sourceWidth":472,
"srcWindow":{
"height":1000000,
"width":1000000,
"x":0,
"y":0
},
"videoPolicy":0,
"videoPolicyIn":0,
"videoPolicyNextScene":0,
"videoPolicyOut":0,
"videoRangeEnd":0,
"videoRangeStart":0,
"webScaleValue":10000,
"window":{
"height":77778,
"width":232292,
"x":630729,
"y":811111
}
}
],
"name":"",
"template":2,
"type":5
},
"message":"success",
"status":0
}
1. Response Status
"status": 0
Name | Description |
---|---|
status | 0 indicates a successful data acquisition. Refer to API Status Codes to find specific description for other values. |