[ADF-4481] Fix Viewer peview for unsupported new versions (#6101)

* [ADF-4481] Fix Viewer peview for unsupported new versions

* Update img-viewer.component.ts
This commit is contained in:
davidcanonieto
2020-09-08 18:28:46 +02:00
committed by GitHub
parent 722e28bc0d
commit 6977df169a
7 changed files with 180 additions and 107 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
import { ContentService } from '../../services/content.service';
@Component({
@@ -39,6 +39,9 @@ export class MediaPlayerComponent implements OnChanges {
@Input()
nameFile: string;
@Output()
error = new EventEmitter<any>();
constructor(private contentService: ContentService ) {}
ngOnChanges(changes: SimpleChanges) {
@@ -52,4 +55,8 @@ export class MediaPlayerComponent implements OnChanges {
throw new Error('Attribute urlFile or blobFile is required');
}
}
onMediaPlayerError() {
this.error.emit();
}
}