VIDEO PLAYER

In this tutorial discuss about how to play video using IOS native player. so follow simple steps that have been given below. so open the terminal and run below command.

To play video design play button in home, so edit home.html

<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name=“menu”></ion-icon>
    </button>
    <ion-title>AV Player</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
  <button ion-button secondary (click)=“play()”>Play</button>
</ion-content>

To play video player edit home.ts as below

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
declare var HKVideoPlayer;

 

@Component({
  selector: ‘page-home’,
  templateUrl: ‘home.html’
})
export class HomePage {

 

  constructor(public navCtrl: NavController) {
  }

 

play() {
HKVideoPlayer.play(“http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4”);
 }
}

Follow up with high-quality video tutorial on YouTube

3 thoughts on “VIDEO PLAYER

Leave a Reply to dilip Cancel reply

Your email address will not be published. Required fields are marked *