mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-27 00:00:05 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
560e5ce7bb | ||
|
|
dc0039b820 | ||
|
|
8bc499f221 | ||
|
|
93ce443467 | ||
|
|
f3c5ebd28b | ||
|
|
bcd46eea9d | ||
|
|
689bfd9568 | ||
|
|
dcf3ab2787 |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,3 +1,24 @@
|
||||
<a name="1.3.16"></a>
|
||||
## [1.3.16](https://github.com/driftyco/ionic-native/compare/v1.3.15...v1.3.16) (2016-08-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **photo-viewer:** method is static ([8bc499f](https://github.com/driftyco/ionic-native/commit/8bc499f))
|
||||
|
||||
|
||||
|
||||
<a name="1.3.15"></a>
|
||||
## [1.3.15](https://github.com/driftyco/ionic-native/compare/v1.3.14...v1.3.15) (2016-08-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **google-analytics:** add missing functions ([689bfd9](https://github.com/driftyco/ionic-native/commit/689bfd9))
|
||||
* **TTS:** add tts plugin ([#431](https://github.com/driftyco/ionic-native/issues/431)) ([dcf3ab2](https://github.com/driftyco/ionic-native/commit/dcf3ab2)), closes [#311](https://github.com/driftyco/ionic-native/issues/311)
|
||||
|
||||
|
||||
|
||||
<a name="1.3.14"></a>
|
||||
## [1.3.14](https://github.com/driftyco/ionic-native/compare/v1.3.13...v1.3.14) (2016-08-15)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "1.3.14",
|
||||
"version": "1.3.16",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
|
||||
@@ -80,6 +80,7 @@ import {StatusBar} from './plugins/statusbar';
|
||||
import {ThreeDeeTouch} from './plugins/3dtouch';
|
||||
import {Toast} from './plugins/toast';
|
||||
import {TouchID} from './plugins/touchid';
|
||||
import {TextToSpeech} from './plugins/text-to-speech';
|
||||
import {TwitterConnect} from './plugins/twitter-connect';
|
||||
import {Vibration} from './plugins/vibration';
|
||||
import {VideoPlayer} from './plugins/video-player';
|
||||
@@ -166,6 +167,7 @@ export {
|
||||
StatusBar,
|
||||
TouchID,
|
||||
Transfer,
|
||||
TextToSpeech,
|
||||
Vibration,
|
||||
WebIntent,
|
||||
Zip
|
||||
@@ -250,6 +252,7 @@ window['IonicNative'] = {
|
||||
Toast: Toast,
|
||||
TouchID: TouchID,
|
||||
Transfer: Transfer,
|
||||
TextToSpeech: TextToSpeech,
|
||||
TwitterConnect: TwitterConnect,
|
||||
VideoPlayer: VideoPlayer,
|
||||
Vibration: Vibration,
|
||||
|
||||
@@ -107,13 +107,34 @@ export class GoogleAnalytics {
|
||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
|
||||
* @param {string} id
|
||||
*/
|
||||
@Cordova()
|
||||
static setUserId(id: string): Promise<any> { return; }
|
||||
@Cordova({sync: true})
|
||||
static setUserId(id: string): void { }
|
||||
|
||||
/**
|
||||
* Sets the app version
|
||||
* @param appVersion
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAppVersion(appVersion: string): void { }
|
||||
|
||||
/**
|
||||
* Set a anonymize Ip address
|
||||
* @param anonymize
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAnonymizeIp(anonymize: boolean): void { }
|
||||
|
||||
/**
|
||||
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
|
||||
* @param allow
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static setAllowIDFACollection(allow: boolean): void { }
|
||||
|
||||
/**
|
||||
* Enable verbose logging
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({sync: true})
|
||||
static debugMode(): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,5 +24,5 @@ export class PhotoViewer {
|
||||
* @param options {any}
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
show(url: string, title?: string, options?: {share?: boolean; }): void { }
|
||||
static show(url: string, title?: string, options?: {share?: boolean; }): void { }
|
||||
}
|
||||
|
||||
47
src/plugins/text-to-speech.ts
Normal file
47
src/plugins/text-to-speech.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
|
||||
export interface TTSOptions {
|
||||
/** text to speak */
|
||||
text: string;
|
||||
/** a string like 'en-US', 'zh-CN', etc */
|
||||
locale?: string;
|
||||
/** speed rate, 0 ~ 1 */
|
||||
rate?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name TTS
|
||||
* @description
|
||||
* Text to Speech plugin
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import {TTS} from 'ionic-native';
|
||||
*
|
||||
* TTS.speak('Hello World')
|
||||
* .then(() => console.log('Success'))
|
||||
* .catch((reason: any) => console.log(reason));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-tts',
|
||||
pluginRef: 'TTS',
|
||||
repo: 'https://github.com/vilic/cordova-plugin-tts'
|
||||
})
|
||||
export class TextToSpeech {
|
||||
|
||||
/**
|
||||
* This function speaks
|
||||
* @param options {string | TTSOptions} Text to speak or TTSOptions
|
||||
* @return {Promise<any>} Returns a promise that resolves when the speaking finishes
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static speak(options: string | TTSOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user