Skip to content

Commit

Permalink
Added performance fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed Jul 29, 2024
1 parent 79df3ec commit abccf87
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": ["crypto"],
"allowedCommonJsDependencies": ["crypto", "jsqr", "crypto-js", "get-youtube-id", "plyr", "crypto-js/md5", "dayjs", "crypto-js/sha1", "get-blob-duration"],
"assets": [
{
"glob": "**/*",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild, HostListener } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { AppHeaderService } from './services/app-header.service';
import { HeaderConfig } from './appConstants';
import { IonRouterOutlet, ModalController, PopoverController, Platform } from '@ionic/angular';
Expand Down
1 change: 0 additions & 1 deletion src/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const domainParts = hostname.split('.');
console.log(domainParts);
const jsonFilename = domainParts[0] + '.json';
const jsonUrl = `../assets/appConfig/${jsonFilename}`;
// const jsonUrl = `../assets/appConfig/localhost.json`;

console.log(`Fetching configuration from: ${jsonUrl}`);

Expand Down
5 changes: 1 addition & 4 deletions src/app/pages/mypitara/mypitara.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { PlayList } from 'src/app/services/playlist/models/playlist.content';
import { PlaylistService } from 'src/app/services/playlist/playlist.service';
import {PlayerType} from 'src/app/appConstants';
import { OnTabViewWillEnter } from 'src/app/tabs/on-tabs-view-will-enter';
import getYouTubeID from 'get-youtube-id';

@Component({
selector: 'app-mypitara',
Expand Down Expand Up @@ -128,9 +127,7 @@ export class MyPitaraPage implements OnTabViewWillEnter{

loadYoutubeImg(metaData: any): string {
let id = metaData.identifier;
// if(id && id.startsWith("do_")) {
// id = getYouTubeID(metaData.url);
// }


const regex = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
const matches = metaData?.url.match(regex);
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/mr.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
"Learning": "शिकणे",
"online courses": "ऑनलाइन कोर्सेस",
"Upload from Youtube": "यूट्यूब वरून अपलोड करा",
"Upload from Diksha": "डिक्षा वरून अपलोड करा",
"Upload from Diksha": "दीक्षा वरून अपलोड करा",
"Update Available": "अपडेट उपलब्ध आहे",
"A new version of the application is available. Load it?": "अॅपची नवीन आवृत्ती उपलब्ध आहे. ती लोड करू का?",
"Yes": "हो",
"Add Diksha URL": "Diksha यूआरएल जोडा",
"Add Diksha URL": "दीक्षा यूआरएल जोडा",
"Add Youtube URL": "यूट्यूब यूआरएल जोडा",
"Name": "नाव",
"Version": "संस्करण"
Expand Down
1 change: 1 addition & 0 deletions src/assets/styles/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
src: url("../fonts/Noto-sans/NotoSans-Regular.ttf"); /* Regular weight */
font-weight: normal;
font-style: normal;
font-display: swap;
}

4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="format-detection" content="telephone=no"/>
<meta name="msapplication-tap-highlight" content="no"/>

<link rel="icon" id="dynamic-favicon" type="image/png" href="assets/icon/favicon/favicon.png"/>
<link rel="icon" media="all" id="dynamic-favicon" type="image/png" href="assets/icon/favicon/favicon.png"/>

<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes"/>
Expand Down Expand Up @@ -70,4 +70,4 @@
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>

</html>
</html>

0 comments on commit abccf87

Please sign in to comment.