FileDocCategorySizeDatePackage
SingleThreadedMediaPlayerProxy.javaAPI DocAndroid 5.1 API3107Thu Mar 12 22:22:48 GMT 2015com.android.ex.variablespeed

SingleThreadedMediaPlayerProxy

public class SingleThreadedMediaPlayerProxy extends Object implements MediaPlayerProxy
Simple wrapper around a {@link MediaPlayerProxy}, guaranteeing that every call made to the MediaPlayerProxy is single-threaded.

Fields Summary
private final MediaPlayerProxy
mDelegate
Constructors Summary
public SingleThreadedMediaPlayerProxy(MediaPlayerProxy delegate)

        mDelegate = delegate;
    
Methods Summary
public synchronized intgetCurrentPosition()

        return mDelegate.getCurrentPosition();
    
public synchronized intgetDuration()

        return mDelegate.getDuration();
    
public synchronized booleanisPlaying()

        return mDelegate.isPlaying();
    
public synchronized booleanisReadyToPlay()

        return mDelegate.isReadyToPlay();
    
public synchronized voidpause()

        mDelegate.pause();
    
public synchronized voidprepare()

        mDelegate.prepare();
    
public synchronized voidrelease()

        mDelegate.release();
    
public synchronized voidreset()

        mDelegate.reset();
    
public synchronized voidseekTo(int startPosition)

        mDelegate.seekTo(startPosition);
    
public voidsetAudioStreamType(int streamType)

        mDelegate.setAudioStreamType(streamType);
    
public synchronized voidsetDataSource(java.lang.String path)

        mDelegate.setDataSource(path);
    
public synchronized voidsetDataSource(android.content.Context context, android.net.Uri intentUri)

        mDelegate.setDataSource(context, intentUri);
    
public synchronized voidsetOnCompletionListener(MediaPlayer.OnCompletionListener listener)

        mDelegate.setOnCompletionListener(listener);
    
public synchronized voidsetOnErrorListener(MediaPlayer.OnErrorListener listener)

        mDelegate.setOnErrorListener(listener);
    
public voidsetVariableSpeed(float rate)

        ((VariableSpeed) mDelegate).setVariableSpeed(rate);
    
public synchronized voidstart()

        mDelegate.start();