Skip to content

Commit

Permalink
Merge pull request #11 from rajnishdargan/feature-pratham
Browse files Browse the repository at this point in the history
Issue #PS-3599 feat: Changes to Run player using pratham-middleware
  • Loading branch information
rajnishdargan authored Feb 11, 2025
2 parents bdc7f32 + f77d2b2 commit 1892cf9
Show file tree
Hide file tree
Showing 13 changed files with 646 additions and 903 deletions.
2 changes: 1 addition & 1 deletion projects/quml-demo-app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DataService } from './services/data.service';
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
contentId = 'do_11395276467516211211';
contentId = 'do_214234702021410816111';
playerConfig: any;

constructor(private dataService: DataService) { }
Expand Down
4 changes: 2 additions & 2 deletions projects/quml-demo-app/src/app/app.constant.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const ApiEndPoints = {
getContent: '/api/content/v1/read/',
getQuestionSetHierarchy: '/learner/questionset/v2/hierarchy/',
questionSetRead: '/api/questionset/v2/read/',
getQuestionSetHierarchy: '/action/questionset/v2/hierarchy/',
questionSetRead: '/action/questionset/v2/read/',
questionList: '/api/question/v2/list',
}
700 changes: 246 additions & 454 deletions projects/quml-demo-app/src/app/quml-library-data.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion projects/quml-demo-app/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

export const environment = {
production: false,
baseUrl: 'https://dev.sunbirded.org',
baseUrl: 'https://dev-middleware.prathamdigital.org',
};

/*
Expand Down
6 changes: 3 additions & 3 deletions projects/quml-demo-app/src/proxy.conf.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"/api/*": {
"target": "https://dev.sunbirded.org",
"target": "https://dev-middleware.prathamdigital.org",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
},
"/action/*": {
"target": "https://dev.sunbirded.org",
"target": "https://dev-middleware.prathamdigital.org",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
},
"/assets/*": {
"target": "https://dev.sunbirded.org",
"target": "https://dev-middleware.prathamdigital.org",
"secure": false,
"logLevel": "debug",
"changeOrigin": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,15 +841,15 @@ export const mockSectionMTFQuestions = [{
"id": "do_113952273632460800126",
"type": "image",
"src": "/assets/public/content/assets/do_113952273632460800126/test.png",
"baseUrl": "https://dev.sunbirded.org"
"baseUrl": "https://dev-middleware.prathamdigital.org"
},
{
"id": "do_113952273902215168128",
"src": "/assets/public/content/assets/do_113952273902215168128/earth.mp4",
"type": "video",
"assetId": "do_113952273902215168128",
"name": "earth",
"baseUrl": "https://dev.sunbirded.org"
"baseUrl": "https://dev-middleware.prathamdigital.org"
}
],
"editorState": {
Expand Down
22 changes: 11 additions & 11 deletions web-component-examples/react-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This guide assumes you already have a React project. If you want to create a new
### Step 1: Installing packages
You can use the npm command-line tool to install packages.
```
npm install --save @project-sunbird/sunbird-quml-player-web-component
npm install --save @tekdi/sunbird-quml-player-web-component
```

### Step 2: Installing dependencies
Expand Down Expand Up @@ -53,8 +53,8 @@ import { useEffect, useRef } from "react";
import "./App.css";

+ import $ from "jquery";
+ import "@project-sunbird/sunbird-quml-player-web-component/styles.css";
+ import "@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js";
+ import "@tekdi/sunbird-quml-player-web-component/styles.css";
+ import "@tekdi/sunbird-quml-player-web-component/sunbird-quml-player.js";


function App() {
Expand All @@ -78,8 +78,8 @@ import { useEffect, useRef } from "react";
import "./App.css";

import $ from "jquery";
import "@project-sunbird/sunbird-quml-player-web-component/styles.css";
import "@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js";
import "@tekdi/sunbird-quml-player-web-component/styles.css";
import "@tekdi/sunbird-quml-player-web-component/sunbird-quml-player.js";


function App() {
Expand All @@ -105,8 +105,8 @@ import { useEffect, useRef } from "react";
import "./App.css";

import $ from "jquery";
import "@project-sunbird/sunbird-quml-player-web-component/styles.css";
import "@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js";
import "@tekdi/sunbird-quml-player-web-component/styles.css";
import "@tekdi/sunbird-quml-player-web-component/sunbird-quml-player.js";

+ import { playerConfig } from "./data";

Expand All @@ -115,7 +115,7 @@ function App() {

// Assign jQuery and questionListUrl to window object
window.jQuery = $;
+ window.questionListUrl = "https://dev.sunbirded.org/api/question/v2/list";
+ window.questionListUrl = "https://dev-middleware.prathamdigital.org/api/question/v2/list";

return (
<div className="App">
Expand All @@ -140,8 +140,8 @@ Import `useRef` hook and create player reference for output events from QuML pla
import "./App.css";

import $ from "jquery";
import "@project-sunbird/sunbird-quml-player-web-component/styles.css";
import "@project-sunbird/sunbird-quml-player-web-component/sunbird-quml-player.js";
import "@tekdi/sunbird-quml-player-web-component/styles.css";
import "@tekdi/sunbird-quml-player-web-component/sunbird-quml-player.js";

import { playerConfig } from "./data";

Expand All @@ -151,7 +151,7 @@ function App() {

// Assign jQuery and questionListUrl to window object
window.jQuery = $;
window.questionListUrl = "https://dev.sunbirded.org/api/question/v2/list";
window.questionListUrl = "https://dev-middleware.prathamdigital.org/api/question/v2/list";

+ useEffect(() => {
+ const playerElement = sunbirdQumlPlayerRef.current;
Expand Down
Loading

0 comments on commit 1892cf9

Please sign in to comment.