UNPKG

ionic-audio

Version:

An audio player for Ionic 3 and Angular 5

63 lines (62 loc) 1.91 kB
import { IAudioTrack } from './ionic-audio-interfaces'; import { ElementRef } from '@angular/core'; /** * # ```<audio-track-play>``` * * Renders a play/pause button that optionally displays a loading spinner * * ## Usage * ```` * <audio-track #audio [track]="myTrack" (onFinish)="onTrackFinished($event)"> * <ion-item> * <audio-track-play item-left [audioTrack]="audio"><ion-spinner></ion-spinner></audio-track-play> * <h3>{{audio.title}}</h3> * </ion-item> * </audio-track> * ```` * If placed within a ```<ion-thumnbail>``` component it will render as a semi-transparent button layover (see live demo). * Passing a ```<ion-spinner>``` as a child element will display a loading spinner while loading. * * ```` * <audio-track #audio [track]="track" (onFinish)="onTrackFinished($event)"> * <ion-item> * <ion-thumbnail item-left> * <img src="{{audio.art}}"> * <audio-track-play dark [audioTrack]="audio"><ion-spinner></ion-spinner></audio-track-play> * </ion-thumbnail> * <p><strong>{{audio.title}}</strong></p> * </ion-item> * </audio-track> * ```` * * @element audio-track-play * @parents audio-track * @export * @class AudioTrackPlayComponent */ export declare class AudioTrackPlayComponent { private el; /** * The AudioTrackComponent parent instance created by ```<audio-track>``` * * @property @Input() audioTrack * @type {IAudioTrack} */ audioTrack: IAudioTrack; /** * Renders the component using the light theme * * @property @Input() light * @type {boolean} */ light: boolean; /** * Renders the component using the dark theme * * @property @Input() dark * @type {boolean} */ dark: boolean; constructor(el: ElementRef); toggle(event: Event): void; }