C# 클래스 WPCordovaClassLib.Cordova.Commands.AudioPlayer

Implements audio record and play back functionality.
상속: IDisposable
파일 보기 프로젝트 열기: ChristianWeyer/tUdUs 1 사용 예제들

공개 메소드들

메소드 설명
AudioPlayer ( Media handler, String id ) : System

Creates AudioPlayer instance

Dispose ( ) : void

Destroys player and stop audio playing or recording

getCurrentPosition ( ) : double

Gets current position of playback

getDuration ( string filePath ) : double

Gets the duration of the audio file

pausePlaying ( ) : void

Pauses playing

seekToPlaying ( int milliseconds ) : void

Seek or jump to a new time in the track

setVolume ( double vol ) : void

Set the volume of the player

startPlaying ( string filePath ) : void

Starts or resume playing audio file

Starts or resume playing audio file

startRecording ( string filePath ) : void

Starts recording, data is stored in memory

stopPlaying ( ) : void

Stops playing the audio file

stopRecording ( ) : void

Stops recording

비공개 메소드들

메소드 설명
FinalizeXnaGameLoop ( ) : void

Finalizes XNA game loop for microphone

InitializeXnaGameLoop ( ) : void

Special initialization required for the microphone: XNA game loop

InvokeCallback ( int message, double value, bool removeHandler ) : void
InvokeCallback ( int message, int value, bool removeHandler ) : void
InvokeCallback ( int message, string value, bool removeHandler ) : void
MediaEnded ( object sender, RoutedEventArgs arg ) : void

Callback to be invoked when playback of a media source has completed

MediaFailed ( object sender, RoutedEventArgs arg ) : void

Callback to be invoked when playback of a media source has failed

MediaOpened ( object sender, RoutedEventArgs arg ) : void

Callback to be invoked when the media source is ready for playback

SaveAudioClipToLocalStorage ( ) : void

Writes audio data from memory to isolated storage

SetState ( int state ) : void

Sets the state and send it to JavaScript

recorderBufferReady ( object sender, EventArgs e ) : void

Copies data from recorder to memory storages and updates recording state

메소드 상세

AudioPlayer() 공개 메소드

Creates AudioPlayer instance
public AudioPlayer ( Media handler, String id ) : System
handler Media Media object
id String player id
리턴 System

Dispose() 공개 메소드

Destroys player and stop audio playing or recording
public Dispose ( ) : void
리턴 void

getCurrentPosition() 공개 메소드

Gets current position of playback
public getCurrentPosition ( ) : double
리턴 double

getDuration() 공개 메소드

Gets the duration of the audio file
public getDuration ( string filePath ) : double
filePath string The name of the audio file
리턴 double

pausePlaying() 공개 메소드

Pauses playing
public pausePlaying ( ) : void
리턴 void

seekToPlaying() 공개 메소드

Seek or jump to a new time in the track
public seekToPlaying ( int milliseconds ) : void
milliseconds int The new track position
리턴 void

setVolume() 공개 메소드

Set the volume of the player
public setVolume ( double vol ) : void
vol double volume 0.0-1.0, default value is 0.5
리턴 void

startPlaying() 공개 메소드

Starts or resume playing audio file Starts or resume playing audio file
public startPlaying ( string filePath ) : void
filePath string The name of the audio file
리턴 void

startRecording() 공개 메소드

Starts recording, data is stored in memory
public startRecording ( string filePath ) : void
filePath string
리턴 void

stopPlaying() 공개 메소드

Stops playing the audio file
public stopPlaying ( ) : void
리턴 void

stopRecording() 공개 메소드

Stops recording
public stopRecording ( ) : void
리턴 void