setColor
setColor
(color
: string):Promise
<string, (ContrastError|TypeError|Error)>
플레이어의 색상을 지정하는 함수.
영상 소유자가 플레이어 색상을 특정 색상으로 지정해놨다면 변경 실패.
params
color
: hex or rgb문자열함수 예시
player.setColor('#00adef
')
player.setColor('#00adef').then((color)=> { // 색상 변경 완료 시 // color : 변경된 색상 문자열 }).catch(function(error) { switch (error.name) { case 'ContrastError': // the color was set, but the contrast is outside of the acceptable // range break; case 'TypeError': // hex 혹은 rgb 색상표기가 잘못된 경우 break; case 'EmbedSettingsError': // 영상 소유자가 특정 color로 설정한 경우. break; default: // some other error occurred break; } });