video caption track

This commit is contained in:
yonghyon
2024-04-27 13:53:04 +09:00
parent 9be6af7966
commit 37490171e7
13 changed files with 562 additions and 75 deletions

View File

@@ -87,3 +87,39 @@ export const getHttpHeaderForServiceRequest = ({
});
}
};
export const getSystemSettings = (
parameters,
{ onSuccess, onFailure, onComplete }
) => {
if (typeof window === "object" && window.PalmSystem) {
if (process.env.REACT_APP_MODE === "DEBUG") {
console.log("LUNA SEND getSystemSettings");
return "Some Hard Coded Mock Data";
} else {
return new LS2Request().send({
service: "luna://com.webos.settingsservice",
method: "getSystemSettings",
subscribe: true,
parameters: parameters,
onSuccess,
onFailure,
onComplete,
});
}
} else if (typeof window === "object") {
const language =
typeof window.navigator === "object"
? window.navigator.language || window.navigator.userLanguage
: "en-US";
const res = {
settings: {
smartServiceCountryCode2: language.split("-")[1],
captionEnable: true,
},
returnValue: true,
};
onSuccess(res);
onComplete(res);
}
};