mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface StreamingVideoOptions {
|
||||
successCallback?: Function;
|
||||
@@ -31,7 +31,7 @@ export interface StreamingAudioOptions {
|
||||
* successCallback: () => { console.log('Video played') },
|
||||
* errorCallback: (e) => { console.log('Error streaming') },
|
||||
* orientation: 'landscape'
|
||||
* };
|
||||
* }
|
||||
*
|
||||
* this.streamingMedia.playVideo('https://path/to/video/stream', options);
|
||||
*
|
||||
@@ -55,7 +55,8 @@ export class StreamingMedia extends IonicNativePlugin {
|
||||
* @param options {StreamingVideoOptions} Options
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
playVideo(videoUrl: string, options?: StreamingVideoOptions): void { }
|
||||
playVideo(videoUrl: string, options?: StreamingVideoOptions): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Streams an audio
|
||||
@@ -63,24 +64,28 @@ export class StreamingMedia extends IonicNativePlugin {
|
||||
* @param options {StreamingAudioOptions} Options
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
playAudio(audioUrl: string, options?: StreamingAudioOptions): void { }
|
||||
playAudio(audioUrl: string, options?: StreamingAudioOptions): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops streaming audio
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
stopAudio(): void { }
|
||||
stopAudio(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses streaming audio
|
||||
*/
|
||||
@Cordova({ sync: true, platforms: ['iOS'] })
|
||||
pauseAudio(): void { }
|
||||
pauseAudio(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes streaming audio
|
||||
*/
|
||||
@Cordova({ sync: true, platforms: ['iOS'] })
|
||||
resumeAudio(): void { }
|
||||
resumeAudio(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user