From 55f9943f86ec0c836d462220e3e1e94d231e3345 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Fri, 14 Apr 2017 15:07:27 +0200 Subject: [PATCH] docs(media): minor fix (#1358) `getDuration` is synchronous, inside the example it was used with a promise, which is quite missleading... --- src/@ionic-native/plugins/media/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/media/index.ts b/src/@ionic-native/plugins/media/index.ts index dd87ed249..52bd034a7 100644 --- a/src/@ionic-native/plugins/media/index.ts +++ b/src/@ionic-native/plugins/media/index.ts @@ -160,9 +160,8 @@ export class MediaObject { * }); * * // get file duration - * file.getDuration().then((duration) => { - * console.log(position); - * }); + * let duration = file.getDuration(); + * console.log(duration); * * // skip to 10 seconds (expects int value in ms) * file.seekTo(10000);