mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
refractor(streaming-media): refractor to resolve duplicate
This commit is contained in:
parent
cf8e3420c0
commit
661276467c
@ -6,9 +6,9 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import {StreamingMedia} from 'ionic-native';
|
* import {StreamingMedia, StreamingVideoOptions} from 'ionic-native';
|
||||||
*
|
*
|
||||||
* let options: VideoOptions = {
|
* let options: StreamingVideoOptions = {
|
||||||
* successCallback: () => { console.log('Video played') },
|
* successCallback: () => { console.log('Video played') },
|
||||||
* errorCallback: (e) => { console.log('Error streaming') },
|
* errorCallback: (e) => { console.log('Error streaming') },
|
||||||
* orientation: 'landscape'
|
* orientation: 'landscape'
|
||||||
@ -28,18 +28,18 @@ export class StreamingMedia {
|
|||||||
/**
|
/**
|
||||||
* Streams a video
|
* Streams a video
|
||||||
* @param videoUrl {string} The URL of the video
|
* @param videoUrl {string} The URL of the video
|
||||||
* @param options {VideoOptions} Options
|
* @param options {StreamingVideoOptions} Options
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({sync: true})
|
||||||
static playVideo(videoUrl: string, options?: VideoOptions): void { }
|
static playVideo(videoUrl: string, options?: StreamingVideoOptions): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Streams an audio
|
* Streams an audio
|
||||||
* @param audioUrl {string} The URL of the audio stream
|
* @param audioUrl {string} The URL of the audio stream
|
||||||
* @param options {AudioOptions} Options
|
* @param options {StreamingAudioOptions} Options
|
||||||
*/
|
*/
|
||||||
@Cordova({sync: true})
|
@Cordova({sync: true})
|
||||||
static playAudio(audioUrl: string, options?: AudioOptions): void { }
|
static playAudio(audioUrl: string, options?: StreamingAudioOptions): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops streaming audio
|
* Stops streaming audio
|
||||||
@ -61,13 +61,13 @@ export class StreamingMedia {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VideoOptions {
|
export interface StreamingVideoOptions {
|
||||||
successCallback?: Function;
|
successCallback?: Function;
|
||||||
errorCallback?: Function;
|
errorCallback?: Function;
|
||||||
orientation?: string;
|
orientation?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AudioOptions {
|
export interface StreamingAudioOptions {
|
||||||
bgColor?: string;
|
bgColor?: string;
|
||||||
bgImage?: string;
|
bgImage?: string;
|
||||||
bgImageScale?: string;
|
bgImageScale?: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user