mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
some changes
This commit is contained in:
@@ -1,54 +1,65 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest package="com.gpr.gabinetedigital"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
package="com.gpr.gabinetedigital">
|
||||||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher"
|
|
||||||
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:supportsRtl="true" android:theme="@style/AppTheme"
|
|
||||||
android:usesCleartextTraffic="true">
|
|
||||||
<activity
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
|
||||||
android:exported="true" android:label="@string/title_activity_main"
|
|
||||||
android:launchMode="singleTask" android:name="com.gpr.gabinetedigital.MainActivity"
|
|
||||||
android:theme="@style/AppTheme.NoActionBarLaunch">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.SEND" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<data android:mimeType="image/*" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.SEND" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<data android:mimeType="text/plain" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<data android:mimeType="image/*" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<receiver
|
|
||||||
android:name=".SharedTextReceiver"
|
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.SEND" />
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
|
||||||
<data android:mimeType="text/plain" />
|
|
||||||
</intent-filter>
|
|
||||||
</receiver>
|
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
<provider android:authorities="${applicationId}.fileprovider" android:exported="false"
|
<application
|
||||||
android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
|
android:allowBackup="true"
|
||||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:resource="@xml/file_paths" />
|
android:label="@string/app_name"
|
||||||
</provider>
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/AppTheme"
|
||||||
|
android:usesCleartextTraffic="true">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||||
|
android:exported="true"
|
||||||
|
android:label="@string/title_activity_main"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:theme="@style/AppTheme.NoActionBarLaunch">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data android:mimeType="text/plain" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
|
<data android:mimeType="image/*" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<provider
|
||||||
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
android:exported="false"
|
||||||
|
android:grantUriPermissions="true">
|
||||||
|
<meta-data
|
||||||
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
|
android:resource="@xml/file_paths" />
|
||||||
|
</provider>
|
||||||
|
</application>
|
||||||
|
|
||||||
</application>
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
Generated
+7
-7
@@ -205,7 +205,7 @@
|
|||||||
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
||||||
"cordova-plugin-globalization": "^1.11.0",
|
"cordova-plugin-globalization": "^1.11.0",
|
||||||
"cordova-plugin-inappbrowser": "^4.0.0",
|
"cordova-plugin-inappbrowser": "^4.0.0",
|
||||||
"cordova-plugin-media": "^5.0.3",
|
"cordova-plugin-media": "^5.0.4",
|
||||||
"cordova-plugin-media-capture": "^3.0.3",
|
"cordova-plugin-media-capture": "^3.0.3",
|
||||||
"cordova-plugin-network-information": "^3.0.0",
|
"cordova-plugin-network-information": "^3.0.0",
|
||||||
"cordova-plugin-statusbar": "^2.4.2",
|
"cordova-plugin-statusbar": "^2.4.2",
|
||||||
@@ -12795,9 +12795,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/cordova-plugin-media": {
|
"node_modules/cordova-plugin-media": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.4.tgz",
|
||||||
"integrity": "sha512-UQPFlpk1zL4BY44zGi8RVmYCvcKBCN4Dyf8ovxqGYCC8zR1yhbTRWYDdO9vJdERwbfgWV7+z7FMWiSUfqWm9bQ==",
|
"integrity": "sha512-mAqincYqOT5gu5LWyfgJu3qmOq+lhLAKhnOZULpG622FvYiHjjfsoJ/fkI55WwI3FIcHeeyhToGvHXBCNJePZg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"cordovaDependencies": {
|
"cordovaDependencies": {
|
||||||
@@ -53515,9 +53515,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cordova-plugin-media": {
|
"cordova-plugin-media": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.4.tgz",
|
||||||
"integrity": "sha512-UQPFlpk1zL4BY44zGi8RVmYCvcKBCN4Dyf8ovxqGYCC8zR1yhbTRWYDdO9vJdERwbfgWV7+z7FMWiSUfqWm9bQ==",
|
"integrity": "sha512-mAqincYqOT5gu5LWyfgJu3qmOq+lhLAKhnOZULpG622FvYiHjjfsoJ/fkI55WwI3FIcHeeyhToGvHXBCNJePZg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"cordova-plugin-media-capture": {
|
"cordova-plugin-media-capture": {
|
||||||
|
|||||||
+1
-1
@@ -219,7 +219,7 @@
|
|||||||
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
"cordova-plugin-fingerprint-aio": "^4.0.2",
|
||||||
"cordova-plugin-globalization": "^1.11.0",
|
"cordova-plugin-globalization": "^1.11.0",
|
||||||
"cordova-plugin-inappbrowser": "^4.0.0",
|
"cordova-plugin-inappbrowser": "^4.0.0",
|
||||||
"cordova-plugin-media": "^5.0.3",
|
"cordova-plugin-media": "^5.0.4",
|
||||||
"cordova-plugin-media-capture": "^3.0.3",
|
"cordova-plugin-media-capture": "^3.0.3",
|
||||||
"cordova-plugin-network-information": "^3.0.0",
|
"cordova-plugin-network-information": "^3.0.0",
|
||||||
"cordova-plugin-statusbar": "^2.4.2",
|
"cordova-plugin-statusbar": "^2.4.2",
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import { FilePicker } from '@capawesome/capacitor-file-picker';
|
|||||||
import { CapacitorVideoPlayer } from 'capacitor-video-player';
|
import { CapacitorVideoPlayer } from 'capacitor-video-player';
|
||||||
import { CaptureError, CaptureImageOptions, MediaCapture, MediaFile } from '@awesome-cordova-plugins/media-capture/ngx';
|
import { CaptureError, CaptureImageOptions, MediaCapture, MediaFile } from '@awesome-cordova-plugins/media-capture/ngx';
|
||||||
import { Capacitor } from '@capacitor/core';
|
import { Capacitor } from '@capacitor/core';
|
||||||
|
import { File } from '@ionic-native/file/ngx';
|
||||||
|
import { Media } from '@ionic-native/media/ngx';
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
quality: 0.5,
|
quality: 0.5,
|
||||||
@@ -207,48 +209,47 @@ export class NewPublicationPage implements OnInit {
|
|||||||
let options: CaptureImageOptions = { limit: 1 }
|
let options: CaptureImageOptions = { limit: 1 }
|
||||||
const data = await this.mediaCapture.captureVideo(options)
|
const data = await this.mediaCapture.captureVideo(options)
|
||||||
this.video = data[0];
|
this.video = data[0];
|
||||||
/* console.log(this.video)
|
console.log(data)
|
||||||
if (result && result.length > 0) {
|
const originalFilePath = 'file:///storage/emulated/0/DCIM/Camera/20231110_125118.mp4';
|
||||||
const videoFile = result[0];
|
const mediaFile = new Media();
|
||||||
const copiedVideoPath = await this.copyVideoToDataDirectory(videoFile);
|
mediaFile.create(data[0].fullPath)
|
||||||
|
console.log(mediaFile)
|
||||||
if (copiedVideoPath) {
|
this.mediaFileToBase64(data[0])
|
||||||
const base64Video = await this.convertVideoToBase64(copiedVideoPath);
|
.then((base64Data) => {
|
||||||
console.log(base64Video);
|
console.log('Base64 data:', base64Data);
|
||||||
}
|
// Now you can use the base64 data as needed
|
||||||
} */
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error converting to base64:', error);
|
||||||
|
// Handle errors
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* this.convertVideoToBase64(data[0].fullPath) */
|
|
||||||
/* this.fileType = "video/mp4"
|
|
||||||
await Filesystem.writeFile({
|
|
||||||
path: data[0].name,
|
|
||||||
data: data[0].fullPath,
|
|
||||||
directory: FilesystemDirectory.Data,
|
|
||||||
}).then(async (dir) => {
|
|
||||||
console.log('DIR ', dir)
|
|
||||||
const base64Video = await this.convertVideoToBase64(dir.uri); */
|
|
||||||
let resultUrl = decodeURIComponent('documents://' + data[0].fullPath);
|
|
||||||
Filesystem.readFile({ path: resultUrl, encoding: Encoding.UTF8, })
|
|
||||||
|
|
||||||
.then(async (content) => {
|
|
||||||
console.log(JSON.stringify(content))
|
|
||||||
const base64Data = btoa(content.data);
|
|
||||||
|
|
||||||
console.log(base64Data);
|
|
||||||
this.filecontent = true;
|
|
||||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
|
||||||
this.photoOrVideo = false;
|
|
||||||
})
|
|
||||||
.catch((err) => console.error(err));
|
|
||||||
/* }); */
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('record video error: ', error)
|
console.log('record video error: ', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mediaFileToBase64(mediaFile) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// Create a FileReader
|
||||||
|
const reader = new FileReader();
|
||||||
|
|
||||||
|
// Set the callback for when the file is loaded
|
||||||
|
reader.onloadend = () => {
|
||||||
|
resolve(reader.result);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set the callback for errors
|
||||||
|
reader.onerror = (error) => {
|
||||||
|
reject(error);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Read the file as Data URL (base64)
|
||||||
|
reader.readAsDataURL(mediaFile);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async loadVideo() {
|
async loadVideo() {
|
||||||
@@ -588,25 +589,25 @@ export class NewPublicationPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async copyVideoToDataDirectory(videoFile: any): Promise<string | null> {
|
async copyVideoToDataDirectory(videoFile: any): Promise<string | null> {
|
||||||
try {
|
try {
|
||||||
const { uri } = videoFile;
|
const { uri } = videoFile;
|
||||||
const fileName = uri.substring(uri.lastIndexOf('/') + 1);
|
const fileName = uri.substring(uri.lastIndexOf('/') + 1);
|
||||||
const targetPath = Directory.Data + fileName; // Set your target directory path
|
const targetPath = Directory.Data + fileName; // Set your target directory path
|
||||||
|
|
||||||
await Filesystem.copy({
|
await Filesystem.copy({
|
||||||
from: uri,
|
from: uri,
|
||||||
to: targetPath,
|
to: targetPath,
|
||||||
});
|
});
|
||||||
|
|
||||||
return targetPath;
|
return targetPath;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async convertVideoToBase64(videoPath: string): Promise<string | null> {
|
async convertVideoToBase64(videoPath: string): Promise<string | null> {
|
||||||
try {
|
try {
|
||||||
const file = await Filesystem.readFile({ path: videoPath, directory: FilesystemDirectory.Data });
|
const file = await Filesystem.readFile({ path: videoPath, directory: FilesystemDirectory.Data });
|
||||||
@@ -620,6 +621,34 @@ export class NewPublicationPage implements OnInit {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async copyAndReadFile(filePath: string): Promise<string> {
|
||||||
|
try {
|
||||||
|
// Copy the file to the app's data directory
|
||||||
|
const copyResult = await Filesystem.copy({
|
||||||
|
from: filePath,
|
||||||
|
to: '20231110_125118.mp4', // or any desired name
|
||||||
|
directory: Directory.Data,
|
||||||
|
});
|
||||||
|
|
||||||
|
const copiedFilePath = copyResult.uri; // Use 'uri' instead of 'to'
|
||||||
|
|
||||||
|
// Read the copied file as base64
|
||||||
|
const readResult = await Filesystem.readFile({
|
||||||
|
path: copiedFilePath,
|
||||||
|
directory: Directory.Data,
|
||||||
|
encoding: Encoding.UTF8,
|
||||||
|
});
|
||||||
|
|
||||||
|
const base64Data = readResult.data;
|
||||||
|
console.log('Base64 data:', base64Data);
|
||||||
|
|
||||||
|
return base64Data;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error copying/reading file:', error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,11 @@
|
|||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
<div class="post-img" >
|
<div (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)" class="post-img" >
|
||||||
<img *ngIf="publication.FileExtension == 'jpeg'" (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)" [lazyLoad]="publication.FileBase64">
|
<img *ngIf="publication.FileExtension != 'mp4'" [lazyLoad]="publication.FileBase64">
|
||||||
|
|
||||||
<video *ngIf="publication.FileExtension == 'mp4'" playsinline controls
|
<video *ngIf="publication.FileExtension == 'mp4'" controls="controls" preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||||
preload="auto">
|
<source src="{{publication.FileBase64}}" type="video/mp4">
|
||||||
<source [src]="'data:video/mp4;base64,'+publication.FileBase6" type="video/mp4">
|
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,13 +36,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Captured -->
|
<!-- Captured -->
|
||||||
<div class="ion-item-container-no-border" *ngIf="capturedImage">
|
<div class="ion-item-container-no-border" *ngIf="captureContent">
|
||||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<ion-thumbnail slot="start">
|
<ion-thumbnail *ngIf="fileType == 'image'" slot="start">
|
||||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage"></ion-img>
|
<ion-img [(ngModel)]="captureContent" name="image" ngDefaultControl [src]="captureContent"></ion-img>
|
||||||
</ion-thumbnail>
|
</ion-thumbnail>
|
||||||
|
|
||||||
|
<ion-thumbnail slot="start">
|
||||||
|
<video *ngIf="fileType == 'video'" width="70" height="70" controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline">
|
||||||
|
<source type="video/mp4" [src]="captureContent">
|
||||||
|
</video>
|
||||||
|
</ion-thumbnail>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ion-label class="pl-10">
|
<ion-label class="pl-10">
|
||||||
<p>{{capturedImageTitle}}</p>
|
<p>{{capturedImageTitle}}</p>
|
||||||
@@ -57,28 +65,31 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Current -->
|
<!-- Current -->
|
||||||
<div class="ion-item-container-no-border mb-20" *ngIf="publication && !( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' ) && !capturedImage">
|
<div *ngIf="!captureContent">
|
||||||
<!-- <ion-label class="attached-title pb-10">Fotografia Anexada</ion-label> -->
|
<div class="ion-item-container-no-border mb-20" *ngIf="publication && !( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' ) && !capturedImage">
|
||||||
<div class="d-flex justify-content-between">
|
<!-- <ion-label class="attached-title pb-10">Fotografia Anexada</ion-label> -->
|
||||||
<div class="d-flex">
|
<div class="d-flex justify-content-between">
|
||||||
<ion-thumbnail slot="start">
|
<div class="d-flex">
|
||||||
<ion-img [(ngModel)]="publication.FileBase64" name="image" ngDefaultControl [src]="publication.FileBase64"></ion-img>
|
<ion-thumbnail slot="start">
|
||||||
</ion-thumbnail>
|
<ion-img [(ngModel)]="publication.FileBase64" name="image" ngDefaultControl [src]="publication.FileBase64"></ion-img>
|
||||||
|
</ion-thumbnail>
|
||||||
<ion-label class="pl-10">
|
|
||||||
<p>{{publication.OriginalFileName}}.{{publication.FileExtension}}</p>
|
<ion-label class="pl-10">
|
||||||
<p hidden>size</p>
|
<p>{{publication.OriginalFileName}}.{{publication.FileExtension}}</p>
|
||||||
</ion-label>
|
<p hidden>size</p>
|
||||||
|
</ion-label>
|
||||||
|
</div>
|
||||||
|
<button class="btn-no-color" (click)="deletePublicationImage()" >
|
||||||
|
<ion-icon name="close"></ion-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn-no-color" (click)="deletePublicationImage()" >
|
|
||||||
<ion-icon name="close"></ion-icon>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="ion-item-container-no-border hide-desktop">
|
<div class="ion-item-container-no-border hide-desktop">
|
||||||
<ion-label (click)="takePicture()">
|
<ion-label (click)="loadVideo()">
|
||||||
<div class="attach-icon">
|
<div class="attach-icon">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photo.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photo.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-add-photo.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-add-photo.svg"></ion-icon>
|
||||||
@@ -90,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ion-item-container-no-border">
|
<div class="ion-item-container-no-border">
|
||||||
<ion-label (click)="laodPicture()" class="cursor-pointer">
|
<ion-label (click)="loadVideo()" class="cursor-pointer">
|
||||||
<div class="attach-icon">
|
<div class="attach-icon">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-add-photos.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-add-photos.svg"></ion-icon>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+3
-2
@@ -34,8 +34,9 @@
|
|||||||
<div class="post-item px-20">
|
<div class="post-item px-20">
|
||||||
<div (click)="openPreview(publication)" class="post-img">
|
<div (click)="openPreview(publication)" class="post-img">
|
||||||
<img *ngIf="publication.FileExtension == 'jpeg'" src="{{publication.FileBase64}}" alt="image" tappable>
|
<img *ngIf="publication.FileExtension == 'jpeg'" src="{{publication.FileBase64}}" alt="image" tappable>
|
||||||
<video *ngIf="publication.FileExtension == 'mp4'" controls>
|
|
||||||
<source type="video/mp4" src="data:video/mp4;{{publication.FileBase64}}">
|
<video *ngIf="publication.FileExtension == 'mp4'" controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline">
|
||||||
|
<source type="video/mp4" [src]="publication.FileBase64">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||||
|
|||||||
@@ -39,9 +39,17 @@
|
|||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
<div class="post-img cursor-pointer" (click)="viewPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
<div *ngIf="publication.FileExtension != 'mp4'" class="post-img cursor-pointer" (click)="viewPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
||||||
<img [lazyLoad]="publication.FileBase64">
|
<img [lazyLoad]="publication.FileBase64">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="publication.FileExtension == 'mp4'" class="post-img cursor-pointer" (click)="viewPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
||||||
|
<video controls="controls" preload="metadata" webkit-playsinline="webkit-playsinline" class="videoPlayer">
|
||||||
|
<source [src]="publication.FileBase64" type="video/mp4" />
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<div class="post-title-time">
|
<div class="post-title-time">
|
||||||
<div class="post-title">
|
<div class="post-title">
|
||||||
|
|||||||
@@ -47,6 +47,19 @@
|
|||||||
.div-logo img{
|
.div-logo img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.video-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
video {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
.div-profile{
|
.div-profile{
|
||||||
font-size: rem(45);
|
font-size: rem(45);
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
Reference in New Issue
Block a user