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