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

@@ -99,22 +99,31 @@ export const getSubTitle =
dispatch({
type: types.GET_SUBTITLE,
payload: response.data.data,
payload: {url: showSubtitleUrl, data: response.data.data},
});
};
const onFail = (error) => {
console.error("getSubTitle onFail", error);
dispatch({
type: types.GET_SUBTITLE,
payload: {url: showSubtitleUrl, data: "Error"},
});
};
TAxios(
dispatch,
getState,
"get",
URLS.SUBTITLE,
{ showSubtitleUrl },
{},
onSuccess,
onFail
);
if(!getState().play.subTitleBlobs[showSubtitleUrl]){
TAxios(
dispatch,
getState,
"get",
URLS.SUBTITLE,
{ showSubtitleUrl },
{},
onSuccess,
onFail
);
}else{
console.log("playActions getSubTitle no Nothing it's exist", showSubtitleUrl);
}
};