cordova插件- Media

小编:管理员 513阅读 2022.09.13

  • 添加插件

$ cordova plugin add cordova-plugin-media

  • 插件的使用
  • Methods

·media.getCurrentAmplitude:Returns the current position within an audio file.

·media.getCurrentPosition:Returns the current position within an audio file.

·media.getDuration:Returns the duration of an audio file.

·media.play: Startor resume playing an audio file.

·media.pause: Pauseplayback of an audio file.

·media.pauseRecord: Pauserecording of an audio file.

·media.release:Releases the underlying operating system's audio resources.

·media.resumeRecord:Resume recording of an audio file.

·media.seekTo: Movesthe position within the audio file.

·media.setVolume: Setthe volume for audio playback.

·media.startRecord: Startrecording an audio file.

·media.stopRecord: Stoprecording an audio file.

·media.stop: Stopplaying an audio file.

2. Example








关联标签: