From 71e49da8adf81a69ec0f4b451754e5fba2da161b Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 27 Dec 2016 07:06:41 -0500 Subject: [PATCH] docs(media): add instructions to listen to status change --- src/plugins/media.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/media.ts b/src/plugins/media.ts index 92c4a77a4..1cc8ecfae 100644 --- a/src/plugins/media.ts +++ b/src/plugins/media.ts @@ -17,7 +17,11 @@ export interface MediaError { * * * // Create a MediaPlugin instance. Expects path to file or url as argument - * var file = new MediaPlugin('path/to/file.mp3'); + * // We can optionally pass a second argument to track the status of the media + * + * const onStatusUpdate = (status) => console.log(status); + * + * const file = new MediaPlugin('path/to/file.mp3', onStatusUpdate); * * // Catch the Success & Error Output * // Platform Quirks