From 17c388464b62b08415068a15c2c03139ed716dbe Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 24 Jun 2024 12:24:12 +0530 Subject: [PATCH 1/2] Issue #ED-0000 fix: ecml contents - downl0ad and play --- src/app/content-details/content-details.page.html | 4 ++-- src/app/content-details/content-details.page.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/app/content-details/content-details.page.html b/src/app/content-details/content-details.page.html index cc8a37d22e..0a08fc8064 100644 --- a/src/app/content-details/content-details.page.html +++ b/src/app/content-details/content-details.page.html @@ -61,14 +61,14 @@
+ *ngIf="!contentDownloadPlay">

{{'PLAY' | translate}}

+ *ngIf="contentDownloadPlay"> diff --git a/src/app/content-details/content-details.page.ts b/src/app/content-details/content-details.page.ts index 788f20a5af..e431bcabbb 100644 --- a/src/app/content-details/content-details.page.ts +++ b/src/app/content-details/content-details.page.ts @@ -198,6 +198,8 @@ export class ContentDetailsPage implements OnInit, OnDestroy { navigateBackFlag = false; @ViewChild('video') video: ElementRef | undefined; contentCategories = []; + contentDownloadPlay = false; + mimeTypesDownloadAndPlay = ['application/vnd.ekstep.h5p-archive', 'application/vnd.ekstep.ecml-archive'] constructor( @Inject('PROFILE_SERVICE') private profileService: ProfileService, @@ -348,6 +350,7 @@ export class ContentDetailsPage implements OnInit, OnDestroy { this.events.subscribe(EventTopics.NEXT_CONTENT, async (data) => { this.generateEndEvent(); this.content = data.content; + this.downloadAndPlayContents(this.content); this.course = data.course; await this.getNavParams(); setTimeout(() => { @@ -563,6 +566,7 @@ export class ContentDetailsPage implements OnInit, OnDestroy { } this.content = data; + this.downloadAndPlayContents(this.content); if (data.contentData.licenseDetails && Object.keys(data.contentData.licenseDetails).length) { this.licenseDetails = data.contentData.licenseDetails; } @@ -1533,6 +1537,7 @@ export class ContentDetailsPage implements OnInit, OnDestroy { content.contentData.status === ContentFilterConfig.CONTENT_STATUS_UNLISTED); if (this.limitedShareContentFlag) { this.content = content; + this.downloadAndPlayContents(this.content); this.playingContent = content; this.identifier = content.contentId || content.identifier; this.telemetryObject = ContentUtil.getTelemetryObject(content); @@ -1766,4 +1771,13 @@ export class ContentDetailsPage implements OnInit, OnDestroy { }); } } + + downloadAndPlayContents(content: any) { + this.contentDownloadPlay = false + this.mimeTypesDownloadAndPlay.forEach(mimetype => { + if(mimetype === content.mimeType) { + this.contentDownloadPlay = true + } + }) + } } From 414d503101a7d4697cfed1600b252e62709fe221 Mon Sep 17 00:00:00 2001 From: vpPavithra Date: Mon, 24 Jun 2024 13:39:22 +0530 Subject: [PATCH 2/2] Issue #ED-0000 fix: ecml contents - downl0ad and play on qr scan --- src/app/qrcoderesult/qrcoderesult.page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/qrcoderesult/qrcoderesult.page.html b/src/app/qrcoderesult/qrcoderesult.page.html index 5388cf064e..52f3c78ca8 100644 --- a/src/app/qrcoderesult/qrcoderesult.page.html +++ b/src/app/qrcoderesult/qrcoderesult.page.html @@ -87,7 +87,7 @@
{{content?.contentData?.name}}
+ *ngIf="content.contentData?.streamingUrl && !(content.mimeType === 'application/vnd.ekstep.h5p-archive' || content.mimeType === 'application/vnd.ekstep.ecml-archive')">