video caption track
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user