play video
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
></video>
|
||||
|
||||
<div class="boxed_contents">
|
||||
<ion-button fill="outline" (click)="playVideo()">Play Video</ion-button>
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header>
|
||||
<ion-card-subtitle>{{groundDetail.spec.title}}</ion-card-subtitle>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
||||
import {AlertController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
@@ -30,4 +30,12 @@ current_media:string = '';
|
||||
this.navctr.back();
|
||||
}
|
||||
|
||||
@ViewChild('video') myVideo: ElementRef;
|
||||
|
||||
playVideo(){
|
||||
this.myVideo.nativeElement.play();
|
||||
}
|
||||
stopVideo(){
|
||||
this.myVideo.nativeElement.pause();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user