Improvements on documentation (#340)

* Improvements on documentation and some refactor

* ts | js -> typescript (docs)
This commit is contained in:
Guillermo
2016-07-20 17:17:09 +02:00
committed by Ibrahim Hadeed
parent d4d30ab9c9
commit 7952f9ef60
65 changed files with 281 additions and 279 deletions
+6 -6
View File
@@ -8,22 +8,22 @@ declare var Media: any;
* @name MediaPlugin
* @description
* @usage
* ```ts
* import {MediaPlugin} from 'ionic-native';
* ```typescript
* import { MediaPlugin } from 'ionic-native';
*
*
*
* // Create a MediaPlugin instance. Expects path to file or url as argument
* var file = new MediaPlugin("path/to/file.mp3");
* var file = new MediaPlugin('path/to/file.mp3');
*
* // Catch the Success & Error Output
* // Platform Quirks
* // iOS calls success on completion of playback only
* // Android calls success on completion of playback AND on release()
* file.init.then(() => {
* console.log("Playback Finished");
* console.log('Playback Finished');
* }, (err) => {
* console.log("somthing went wrong! error code: "+err.code+" message: "+err.message);
* console.log('somthing went wrong! error code: ' + err.code + ' message: ' + err.message);
* });
*
* // play the file
@@ -55,7 +55,7 @@ declare var Media: any;
* file.release();
*
* // Recording to a file
* var newFile = new MediaPlugin("path/to/file.mp3");
* var newFile = new MediaPlugin('path/to/file.mp3');
* newFile.startRecord();
*
* newFile.stopRecord();