mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Improvements on documentation (#340)
* Improvements on documentation and some refactor * ts | js -> typescript (docs)
This commit is contained in:
committed by
Ibrahim Hadeed
parent
d4d30ab9c9
commit
7952f9ef60
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user