player system subtitle

This commit is contained in:
yonghyon
2024-06-17 17:42:21 +09:00
parent d90b261a19
commit bcfd6481a6
3 changed files with 29 additions and 20 deletions

View File

@@ -143,7 +143,7 @@ export function checkValidCountry(ricCode, country) {
// 3.0 ~ 4.5
export const setSubtitleEnable = (
showId,
mediaId,
captionEnable,
{ onSuccess, onFailure, onComplete }
) => {
@@ -156,7 +156,7 @@ export const setSubtitleEnable = (
return new LS2Request().send({
service: "luna://com.webos.service.tv.subtitle",
method: "enableSubtitle",
parameters: { pipelineId: showId },
parameters: { pipelineId: mediaId },
onSuccess,
onFailure,
onComplete,
@@ -165,7 +165,7 @@ export const setSubtitleEnable = (
return new LS2Request().send({
service: "luna://com.webos.service.tv.subtitle",
method: "disableSubtitle",
parameters: { pipelineId: showId },
parameters: { pipelineId: mediaId },
onSuccess,
onFailure,
onComplete,
@@ -176,19 +176,15 @@ export const setSubtitleEnable = (
// 5.0
export const setSubtitleEnableOver5 = (
showId,
mediaId,
captionEnable,
{ onSuccess, onFailure, onComplete }
) => {
if (
typeof window === "object" &&
window.PalmSystem &&
process.env.REACT_APP_MODE !== "DEBUG"
) {
if (typeof window === "object" && window.PalmSystem) {
return new LS2Request().send({
service: "luna://com.webos.media",
method: "setSubtitleEnable",
parameters: { enable: captionEnable, mediaId: showId },
parameters: { enable: captionEnable, mediaId: mediaId },
onSuccess,
onFailure,
onComplete,