mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
video player add to web
This commit is contained in:
@@ -30,8 +30,18 @@
|
||||
<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>
|
||||
|
||||
<provider android:authorities="${applicationId}.fileprovider" android:exported="false"
|
||||
|
||||
<provider android:authorities="${applicationId}.fileprovider" android:exported="false"
|
||||
android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
|
||||
@@ -221,15 +221,15 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
/* this.convertVideoToBase64(data[0].fullPath) */
|
||||
this.fileType = "video/mp4"
|
||||
/* 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(dir.uri);
|
||||
const base64Video = await this.convertVideoToBase64(dir.uri); */
|
||||
let resultUrl = decodeURIComponent('documents://' + data[0].fullPath);
|
||||
Filesystem.readFile({ path: resultUrl, encoding: Encoding.UTF8, })
|
||||
|
||||
.then(async (content) => {
|
||||
@@ -241,8 +241,8 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
||||
this.photoOrVideo = false;
|
||||
})
|
||||
.catch((err) => console.error(err)); */
|
||||
});
|
||||
.catch((err) => console.error(err));
|
||||
/* }); */
|
||||
|
||||
} catch (error) {
|
||||
console.log('record video error: ', error)
|
||||
|
||||
+3
-4
@@ -33,10 +33,9 @@
|
||||
</ion-refresher>
|
||||
<div class="post-item px-20">
|
||||
<div (click)="openPreview(publication)" class="post-img">
|
||||
<!-- <img src="{{publication.FileBase64}}" alt="image" tappable> -->
|
||||
<video controls>
|
||||
<source type="video/webm" src="data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8......jVOrhB9DtnVTrIMQTPc=">
|
||||
<source type="video/mp4" src="data:video/mp4;base64,AAAAHGZ0eXBtcDQyAAAAAG1wNDJpc29....../l/L+X8v5AAAAMgfDg==">
|
||||
<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>
|
||||
</div>
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
|
||||
Reference in New Issue
Block a user