Skip to content

Commit

Permalink
Added setTime() method to android/modules/media/src/java/ti/modules/t…
Browse files Browse the repository at this point in the history
…itanium/media/AudioPlayerProxy.java
  • Loading branch information
sheran committed Apr 27, 2013
1 parent 7c83c2f commit 2f7b2f2
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -20,7 +20,7 @@
import android.app.Activity;

@Kroll.proxy(creatableInModule=MediaModule.class, propertyAccessors={
TiC.PROPERTY_VOLUME
TiC.PROPERTY_VOLUME, TiC.PROPERTY_TIME
})
public class AudioPlayerProxy extends KrollProxy
implements OnLifecycleEvent
Expand Down Expand Up @@ -48,6 +48,7 @@ public AudioPlayerProxy()
//((TiBaseActivity)getActivity()).addOnLifecycleEventListener(this);

defaultValues.put(TiC.PROPERTY_VOLUME, 1.0f);
defaultValues.put(TiC.PROPERTY_TIME,0);
}

public AudioPlayerProxy(TiContext tiContext)
Expand Down Expand Up @@ -110,6 +111,15 @@ public boolean isPaused() {
}
return false;
}

@Kroll.setProperty @Kroll.method
public void setTime(int time){
if(time != 0){
setProperty(TiC.PROPERTY_TIME, time);

}
}


// An alias for play so that
@Kroll.method
Expand Down

0 comments on commit 2f7b2f2

Please sign in to comment.