修复不兼容老版LedPlayer的问题

This commit is contained in:
fangxiang 2022-08-22 15:25:41 +08:00
parent 464ab43666
commit 4c47c8e45b
4 changed files with 14 additions and 5 deletions

View File

@ -47,7 +47,9 @@ export default defineComponent({
(<any>window).media_control_client_product ==
EProductNames.LED_PLAYER ||
(<any>window).media_control_client_product ==
EProductNames.SPECIAL_VIDEO
EProductNames.SPECIAL_VIDEO ||
(<any>window).media_control_client_product ==
EProductNames.OLD_LED_PLAYER
)
) {
console.error("can't get product, use default led_player");
@ -58,7 +60,8 @@ export default defineComponent({
//
if (
(<any>window).media_control_client_product == EProductNames.LED_PLAYER
(<any>window).media_control_client_product == EProductNames.LED_PLAYER ||
(<any>window).media_control_client_product == EProductNames.OLD_LED_PLAYER
) {
document.title = $t.t("LedPlayer") + "WebApp";
} else if (

View File

@ -133,7 +133,8 @@ export default defineComponent({
const product_name = ref("LedPlayer");
if (
(<any>window).media_control_client_product == EProductNames.LED_PLAYER
(<any>window).media_control_client_product == EProductNames.LED_PLAYER ||
(<any>window).media_control_client_product == EProductNames.OLD_LED_PLAYER
) {
product.value = "LedPlayer";
product_name.value = "LedPlayer";

View File

@ -1,4 +1,5 @@
export enum EProductNames {
LED_PLAYER = "LED_PLAYER",
OLD_LED_PLAYER = "RK_3568",
SPECIAL_VIDEO = "SPECIAL_VIDEO",
}

View File

@ -330,7 +330,10 @@ export default store(function (/* { ssrContext } */) {
product_name: EProductNames.LED_PLAYER,
isLedPlayer: () => {
return Store.state.product_name == EProductNames.LED_PLAYER;
return (
Store.state.product_name == EProductNames.LED_PLAYER ||
Store.state.product_name == EProductNames.OLD_LED_PLAYER
);
},
isSpecialVideo: () => {
return Store.state.product_name == EProductNames.SPECIAL_VIDEO;
@ -352,7 +355,8 @@ export default store(function (/* { ssrContext } */) {
setProductName(state: StateInterface, playload?: any) {
if (
playload == EProductNames.LED_PLAYER ||
playload == EProductNames.SPECIAL_VIDEO
playload == EProductNames.SPECIAL_VIDEO ||
playload == EProductNames.OLD_LED_PLAYER
) {
state.product_name = playload;
}