feat: update

parent 868e5ada
<div [ngStyle]="{'width.px': Video.width,'height.px':Video.height}"> <div [ngStyle]="{'width.px': Video.width,'height.px':Video.height}">
<video controls> <video controls>
<source [src]="Video.src" type="video/mp4"> <source [src]="Video.src" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
<br> <br>
......
...@@ -13,6 +13,13 @@ export class Mp4Component implements OnInit { ...@@ -13,6 +13,13 @@ export class Mp4Component implements OnInit {
} }
ngOnInit() { ngOnInit() {
if (this.Video.height === 0) {
this.Video.height = 600;
}
if (this.Video.width === 0) {
this.Video.width = 800;
}
} }
} }
...@@ -29,8 +29,8 @@ export class ReplayPageComponent implements OnInit { ...@@ -29,8 +29,8 @@ export class ReplayPageComponent implements OnInit {
Video.type = data['type']; Video.type = data['type'];
Video.src = data['src']; Video.src = data['src'];
Video.id = data['id']; Video.id = data['id'];
Video.width = data['width']; // Video.width = data['width'];
Video.height = data['height']; // Video.height = data['height'];
}, },
err => { err => {
this._http.get_replay(token) this._http.get_replay(token)
......
<tree-root [nodes]="nodes" [options]="options"></tree-root> <!--<tree-root [nodes]="nodes" [options]="options"></tree-root>-->
<app-replay-mp4></app-replay-mp4>
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {DataStore} from '../globals'; import {DataStore, Video} from '../globals';
import {TREE_ACTIONS, KEYS, IActionMapping, ITreeOptions} from 'angular-tree-component'; import {TREE_ACTIONS, KEYS, IActionMapping, ITreeOptions} from 'angular-tree-component';
@Component({ @Component({
...@@ -68,7 +68,8 @@ export class TestPageComponent implements OnInit { ...@@ -68,7 +68,8 @@ export class TestPageComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
Video.id = 'asfafdasd';
Video.src = 'https://www.w3schools.com/tags/movie.mp4';
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment