Skip to content

Commit

Permalink
Merge pull request #297 from Aar-if/slow
Browse files Browse the repository at this point in the history
Issue #2242 feat: Course Editor integration in Admin app
  • Loading branch information
itsvick authored Nov 7, 2024
2 parents 1cea5ea + 6d95ec1 commit 71114fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
File renamed without changes.
11 changes: 7 additions & 4 deletions src/pages/play/content/[identifier].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ import {
} from "@/services/PlayerService";
import { PlayerConfig } from "@/utils/Interfaces";
import { Box } from "@mui/material";
import { V1PlayerConfig, V2PlayerConfig } from "./player-config";
import { QUESTIONSET_MIME_TYPE, INTERACTIVE_MIME_TYPE } from "../../../../config.json"
import { V1PlayerConfig, V2PlayerConfig } from "../../../data/player-config";
import {
QUESTIONSET_MIME_TYPE,
INTERACTIVE_MIME_TYPE,
} from "../../../../config.json";

// @ts-ignore
const SunbirdPlayers = dynamic(() => import("editor/SunbirdPlayers"), {
ssr: false,
});

let playerConfig = {config: {}, context: {}, metadata: {}, data: {}};
let playerConfig = { config: {}, context: {}, metadata: {}, data: {} };

interface SunbirdPlayerProps {
playerConfig: PlayerConfig;
Expand All @@ -44,7 +47,7 @@ const players: React.FC<SunbirdPlayerProps> = () => {
const metadata = { ...Q1?.questionset, ...Q2?.questionset };
playerConfig.metadata = metadata;
console.log("playerConfig", playerConfig);
} else if(INTERACTIVE_MIME_TYPE.includes(data?.mimeType)) {
} else if (INTERACTIVE_MIME_TYPE.includes(data?.mimeType)) {
playerConfig = V1PlayerConfig;
playerConfig.metadata = data;
} else {
Expand Down

0 comments on commit 71114fc

Please sign in to comment.