Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master dca8c5ca6 -> ca3ff60a7


CB-6127lisa7cordova-plugin-consolecordova-plugin-media documentation 
translation: cordova-plugin-media


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/ca3ff60a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/ca3ff60a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/ca3ff60a

Branch: refs/heads/master
Commit: ca3ff60a7363e019379b0ef9b87942cf3d233ab2
Parents: dca8c5c
Author: Lisa Seacat DeLuca <[email protected]>
Authored: Mon Jul 7 15:27:59 2014 -0400
Committer: Lisa Seacat DeLuca <[email protected]>
Committed: Mon Jul 7 15:27:59 2014 -0400

----------------------------------------------------------------------
 doc/de/index.md |   8 +-
 doc/es/index.md |   8 +-
 doc/fr/index.md |   8 +-
 doc/it/index.md |   8 +-
 doc/ja/index.md |   8 +-
 doc/ko/index.md |   8 +-
 doc/ru/index.md | 488 +++++++++++++++++++++++++++++++++++++++++++++++++++
 doc/zh/index.md |   8 +-
 8 files changed, 516 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/de/index.md
----------------------------------------------------------------------
diff --git a/doc/de/index.md b/doc/de/index.md
index 38d4f3a..71e9a25 100644
--- a/doc/de/index.md
+++ b/doc/de/index.md
@@ -482,7 +482,7 @@ A `MediaError` Objekt wird zurückgegeben, um die 
`mediaError` Callback-Funktion
 
 ### Konstanten
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/es/index.md
----------------------------------------------------------------------
diff --git a/doc/es/index.md b/doc/es/index.md
index 01f9e12..ecf4ff9 100644
--- a/doc/es/index.md
+++ b/doc/es/index.md
@@ -482,7 +482,7 @@ A `MediaError` objeto es devuelto a la `mediaError` 
función de devolución de l
 
 ### Constantes
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/fr/index.md
----------------------------------------------------------------------
diff --git a/doc/fr/index.md b/doc/fr/index.md
index ce439fa..095dfa1 100644
--- a/doc/fr/index.md
+++ b/doc/fr/index.md
@@ -482,7 +482,7 @@ Un objet `MediaError` est transmis à la fonction callback 
`mediaError` lorsqu'u
 
 ### Constantes
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/it/index.md
----------------------------------------------------------------------
diff --git a/doc/it/index.md b/doc/it/index.md
index 1ef9b07..83f3663 100644
--- a/doc/it/index.md
+++ b/doc/it/index.md
@@ -482,7 +482,7 @@ A `MediaError` oggetto viene restituito alla `mediaError` 
funzione di callback q
 
 ### Costanti
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/ja/index.md
----------------------------------------------------------------------
diff --git a/doc/ja/index.md b/doc/ja/index.md
index 2ed4fdc..bf89299 100644
--- a/doc/ja/index.md
+++ b/doc/ja/index.md
@@ -482,7 +482,7 @@ A `MediaError` オブジェクトに返される、 
`mediaError` コールバッ
 
 ### 定数
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/ko/index.md
----------------------------------------------------------------------
diff --git a/doc/ko/index.md b/doc/ko/index.md
index b197b91..7af2967 100644
--- a/doc/ko/index.md
+++ b/doc/ko/index.md
@@ -482,7 +482,7 @@ A `MediaError` 개체에 반환 됩니다는 `mediaError` 
콜백 함수 오류
 
 ### 상수
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/ru/index.md
----------------------------------------------------------------------
diff --git a/doc/ru/index.md b/doc/ru/index.md
new file mode 100644
index 0000000..e58b979
--- /dev/null
+++ b/doc/ru/index.md
@@ -0,0 +1,488 @@
+<!---
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+# org.apache.cordova.media
+
+Этот плагин предоставляет возможность 
записывать и воспроизводить аудио файлы на 
устройство.
+
+**Примечание**: Текущая реализация не 
соответствует спецификации W3C для захвата 
СМИ и предоставляется только для удобства. 
Будущее осуществление будет 
придерживаться последней спецификации W3C и 
может Опознайте текущих API.
+
+## Установка
+
+    cordova plugin add org.apache.cordova.media
+    
+
+## Поддерживаемые платформы
+
+*   Android
+*   BlackBerry 10
+*   iOS
+*   Windows Phone 7 и 8
+*   Tizen
+*   Windows 8
+
+## Windows Phone причуды
+
+*   Только один файл может воспроизводиться 
одновременно.
+
+*   Существуют строгие ограничения в 
отношении как ваше приложение 
взаимодействует с другими средствами 
массовой информации. Смотрите в 
[документации Microsoft для подробной 
информации][1].
+
+ [1]: 
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh184838(v=vs.92).aspx
+
+## Средства массовой информации
+
+    var media = new Media(src, mediaSuccess, [mediaError], [mediaStatus]);
+    
+
+### Параметры
+
+*   **src**: URI, содержащий аудио-контент. *(DOMString)*
+
+*   **mediaSuccess**: (необязательно) обратного 
вызова, который выполняется после `Media` 
объект завершения текущего 
воспроизведения, записи или стоп действий. 
*(Функция)*
+
+*   **mediaError**: (необязательно) обратного 
вызова, который выполняется при 
возникновении ошибки. *(Функция)*
+
+*   **mediaStatus**: (необязательно) обратного 
вызова, который выполняется для 
отображения изменений состояния. *(Функция)*
+
+### Константы
+
+Следующие константы сообщается как 
единственный параметр для `mediaStatus` 
обратного вызова:
+
+*   `Media.MEDIA_NONE` = 0;
+*   `Media.MEDIA_STARTING` = 1;
+*   `Media.MEDIA_RUNNING` = 2;
+*   `Media.MEDIA_PAUSED` = 3;
+*   `Media.MEDIA_STOPPED` = 4;
+
+### Методы
+
+*   `media.getCurrentPosition`: Возвращает текущую 
позицию в аудиофайл.
+
+*   `media.getDuration`: Возвращает 
продолжительность звукового файла.
+
+*   `media.play`: Начать или возобновить 
воспроизведение звукового файла.
+
+*   `media.pause`: Приостановка воспроизведения 
звукового файла.
+
+*   `media.release`: Выпускает аудио ресурсы 
базовой операционной системы.
+
+*   `media.seekTo`: Перемещает положение в пределах
 звукового файла.
+
+*   `media.setVolume`: Задайте громкость 
воспроизведения звука.
+
+*   `media.startRecord`: Начните запись звукового 
файла.
+
+*   `media.stopRecord`: Остановите запись аудио 
файлов.
+
+*   `media.stop`: Остановка воспроизведения 
звукового файла.
+
+### Дополнительные ReadOnly параметры
+
+*   **позиции**: позиция в аудио 
воспроизведения в секундах.
+    
+    *   Не автоматически обновляются во время 
игры; Вызовите `getCurrentPosition` для обновления.
+
+*   **Продолжительность**: продолжительность 
СМИ, в секундах.
+
+## media.getCurrentPosition
+
+Возвращает текущую позицию в звуковой 
файл. Также обновляет `Media` объекта `position` 
параметр.
+
+    media.getCurrentPosition(mediaSuccess, [mediaError]);
+    
+
+### Параметры
+
+*   **mediaSuccess**: обратный вызов, который 
передается в текущую позицию в секундах.
+
+*   **mediaError**: (необязательно) обратного 
вызова для выполнения, если происходит 
ошибка.
+
+### Быстрый пример
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+    
+    // Update media position every second
+    var mediaTimer = setInterval(function () {
+        // get media position
+        my_media.getCurrentPosition(
+            // success callback
+            function (position) {
+                if (position > -1) {
+                    console.log((position) + " sec");
+                }
+            },
+            // error callback
+            function (e) {
+                console.log("Error getting pos=" + e);
+            }
+        );
+    }, 1000);
+    
+
+## media.getDuration
+
+Возвращает продолжительность аудио файла 
в секундах. Если длительность неизвестна, 
она возвращает значение -1.
+
+    media.getDuration();
+    
+
+### Быстрый пример
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+    
+    // Get duration
+    var counter = 0;
+    var timerDur = setInterval(function() {
+        counter = counter + 100;
+        if (counter > 2000) {
+            clearInterval(timerDur);
+        }
+        var dur = my_media.getDuration();
+        if (dur > 0) {
+            clearInterval(timerDur);
+            document.getElementById('audio_duration').innerHTML = (dur) + " 
sec";
+        }
+    }, 100);
+    
+
+## Media.Pause
+
+Приостанавливает воспроизведение 
звукового файла.
+
+    media.pause();
+    
+
+### Быстрый пример
+
+    // Play audio
+    //
+    function playAudio(url) {
+        // Play the audio file at url
+        var my_media = new Media(url,
+            // success callback
+            function () { console.log("playAudio():Audio Success"); },
+            // error callback
+            function (err) { console.log("playAudio():Audio Error: " + err); }
+        );
+    
+        // Play audio
+        my_media.play();
+    
+        // Pause after 10 seconds
+        setTimeout(function () {
+            media.pause();
+        }, 10000);
+    }
+    
+
+## Media.Play
+
+Запускает или возобновляет 
воспроизведение звукового файла.
+
+    media.play();
+    
+
+### Быстрый пример
+
+    // Play audio
+    //
+    function playAudio(url) {
+        // Play the audio file at url
+        var my_media = new Media(url,
+            // success callback
+            function () {
+                console.log("playAudio():Audio Success");
+            },
+            // error callback
+            function (err) {
+                console.log("playAudio():Audio Error: " + err);
+            }
+        );
+        // Play audio
+        my_media.play();
+    }
+    
+
+### iOS причуды
+
+*   **numberOfLoops**: этот параметр, чтобы передать 
`play` метод, чтобы указать количество раз, вы 
хотите, чтобы средства массовой информации 
файла для воспроизведения, например:
+    
+        var myMedia = new 
Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3";)
+        myMedia.play({ numberOfLoops: 2 })
+        
+
+*   **playAudioWhenScreenIsLocked**: передайте этот 
параметр для `play` метод, чтобы указать, х
отите ли вы разрешить воспроизведение, 
когда экран заблокирован. Если значение 
`true` (значение по умолчанию), состояние 
оборудования безгласную кнопку 
игнорируется, например:
+    
+        var myMedia = new 
Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3";)
+        myMedia.play({ playAudioWhenScreenIsLocked : false })
+        
+
+*   **Порядок поиска файла**: когда 
предоставляется только имя файла или 
простой путь, iOS ищет в `www` каталог для 
файла, а затем в приложении `documents/tmp` 
каталога:
+    
+        var myMedia = new Media("audio/beer.mp3")
+        myMedia.play()  // first looks for file in www/audio/beer.mp3 then in 
<application>/documents/tmp/audio/beer.mp3
+        
+
+## media.release
+
+Освобождает ресурсы аудио базовой 
операционной системы. Это особенно важно 
для Android, так как существует конечное 
количество экземпляров OpenCore для 
воспроизведения мультимедиа. Приложения 
должны вызвать `release` функция для любого 
`Media` ресурс, который больше не нужен.
+
+    media.release();
+    
+
+### Быстрый пример
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+    
+    my_media.play();
+    my_media.stop();
+    my_media.release();
+    
+
+## media.seekTo
+
+Задает текущую позицию в течение 
звукового файла.
+
+    media.seekTo(milliseconds);
+    
+
+### Параметры
+
+*   **МС**: позиции задать позицию 
воспроизведения в аудио, в миллисекундах.
+
+### Быстрый пример
+
+    // Audio player
+    //
+    var my_media = new Media(src, onSuccess, onError);
+        my_media.play();
+    // SeekTo to 10 seconds after 5 seconds
+    setTimeout(function() {
+        my_media.seekTo(10000);
+    }, 5000);
+    
+
+### Причуды blackBerry 10
+
+*   Не поддерживается на устройствах BlackBerry 
OS 5.
+
+## media.setVolume
+
+Задайте громкость звукового файла.
+
+    media.setVolume(volume);
+    
+
+### Параметры
+
+*   **объем**: тома, чтобы задать для 
воспроизведения. Значение должно быть в 
диапазоне от 0.0 до 1.0.
+
+### Поддерживаемые платформы
+
+*   Android
+*   iOS
+
+### Быстрый пример
+
+    // Play audio
+    //
+    function playAudio(url) {
+        // Play the audio file at url
+        var my_media = new Media(url,
+            // success callback
+            function() {
+                console.log("playAudio():Audio Success");
+            },
+            // error callback
+            function(err) {
+                console.log("playAudio():Audio Error: "+err);
+        });
+    
+        // Play audio
+        my_media.play();
+    
+        // Mute volume after 2 seconds
+        setTimeout(function() {
+            my_media.setVolume('0.0');
+        }, 2000);
+    
+        // Set volume to 1.0 after 5 seconds
+        setTimeout(function() {
+            my_media.setVolume('1.0');
+        }, 5000);
+    }
+    
+
+## media.startRecord
+
+Начинает запись аудио файлов.
+
+    media.startRecord();
+    
+
+### Поддерживаемые платформы
+
+*   Android
+*   iOS
+*   Windows Phone 7 и 8
+*   Windows 8
+
+### Быстрый пример
+
+    // Record audio
+    //
+    function recordAudio() {
+        var src = "myrecording.mp3";
+        var mediaRec = new Media(src,
+            // success callback
+            function() {
+                console.log("recordAudio():Audio Success");
+            },
+    
+            // error callback
+            function(err) {
+                console.log("recordAudio():Audio Error: "+ err.code);
+            });
+    
+        // Record audio
+        mediaRec.startRecord();
+    }
+    
+
+### Android причуды
+
+*   Android устройств записи аудио в формате 
адаптивной мульти ставка. Указанный файл 
должен заканчиваться *.amr* расширение.
+
+### iOS причуды
+
+*   iOS только записи в файлы типа *.wav* и 
возвращает ошибку, если расширение не 
исправить.
+
+*   Если полный путь не указан, запись 
помещается в приложения `documents/tmp` каталог. 
Это могут быть доступны через `File` API с 
помощью `LocalFileSystem.TEMPORARY` . Любой подкаталог, 
указанный на время записи должны уже 
существовать.
+
+*   Файлы могут быть и сыграны записываются 
обратно, используя документы URI:
+    
+        var myMedia = new Media("documents://beer.mp3")
+        
+
+### Причуды Tizen
+
+*   Не поддерживается на устройствах Tizen.
+
+## media.stop
+
+Останавливает воспроизведение звукового 
файла.
+
+    media.stop();
+    
+
+### Быстрый пример
+
+    // Play audio
+    //
+    function playAudio(url) {
+        // Play the audio file at url
+        var my_media = new Media(url,
+            // success callback
+            function() {
+                console.log("playAudio():Audio Success");
+            },
+            // error callback
+            function(err) {
+                console.log("playAudio():Audio Error: "+err);
+            }
+        );
+    
+        // Play audio
+        my_media.play();
+    
+        // Pause after 10 seconds
+        setTimeout(function() {
+            my_media.stop();
+        }, 10000);
+    }
+    
+
+## media.stopRecord
+
+Прекращает запись аудио файлов.
+
+    media.stopRecord();
+    
+
+### Поддерживаемые платформы
+
+*   Android
+*   iOS
+*   Windows Phone 7 и 8
+*   Windows 8
+
+### Быстрый пример
+
+    // Record audio
+    //
+    function recordAudio() {
+        var src = "myrecording.mp3";
+        var mediaRec = new Media(src,
+            // success callback
+            function() {
+                console.log("recordAudio():Audio Success");
+            },
+    
+            // error callback
+            function(err) {
+                console.log("recordAudio():Audio Error: "+ err.code);
+            }
+        );
+    
+        // Record audio
+        mediaRec.startRecord();
+    
+        // Stop recording after 10 seconds
+        setTimeout(function() {
+            mediaRec.stopRecord();
+        }, 10000);
+    }
+    
+
+### Причуды Tizen
+
+*   Не поддерживается на устройствах Tizen.
+
+## MediaError
+
+A `MediaError` объект возвращается к `mediaError` 
функции обратного вызова при 
возникновении ошибки.
+
+### Свойства
+
+*   **код**: один из предопределенных кодов, 
перечисленных ниже.
+
+*   **сообщение**: сообщение об ошибке, с 
подробными сведениями об ошибке.
+
+### Константы
+
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/ca3ff60a/doc/zh/index.md
----------------------------------------------------------------------
diff --git a/doc/zh/index.md b/doc/zh/index.md
index c9c8907..bb8e627 100644
--- a/doc/zh/index.md
+++ b/doc/zh/index.md
@@ -482,7 +482,7 @@ A `MediaError` 物件返回到 `mediaError` 
時出現錯誤的回呼函數。
 
 ### 常量
 
-*   `MediaError.MEDIA_ERR_ABORTED`
-*   `MediaError.MEDIA_ERR_NETWORK`
-*   `MediaError.MEDIA_ERR_DECODE`
-*   `MediaError.MEDIA_ERR_NONE_SUPPORTED`
\ No newline at end of file
+*   `MediaError.MEDIA_ERR_ABORTED` = 1
+*   `MediaError.MEDIA_ERR_NETWORK` = 2
+*   `MediaError.MEDIA_ERR_DECODE` = 3
+*   `MediaError.MEDIA_ERR_NONE_SUPPORTED` = 4
\ No newline at end of file

Reply via email to