本文整理汇总了Java中org.fourthline.cling.support.avtransport.callback.Play类的典型用法代码示例。如果您正苦于以下问题:Java Play类的具体用法?Java Play怎么用?Java Play使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Play类属于org.fourthline.cling.support.avtransport.callback包,在下文中一共展示了Play类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: play
import org.fourthline.cling.support.avtransport.callback.Play; //导入依赖的package包/类
public void play() {
Play callback = new Play(mAvTransportService) {
@SuppressWarnings("rawtypes")
@Override
public void failure(ActionInvocation actionInvocation,
UpnpResponse response, String message) {
// TODO Auto-generated method stub
Log.e(LOG_TAG, "Play failed! the reason is:" + message
+ "the response details is:" + response);
Utils.showToast(mContext, message);
}
};
if (mAvTransportService != null)
mAndroidUpnpService.getControlPoint().execute(callback);
}
开发者ID:sky24987,项目名称:UPlayer,代码行数:17,代码来源:Controller.java
示例2: play
import org.fourthline.cling.support.avtransport.callback.Play; //导入依赖的package包/类
public static void play() {
Device device = SystemManager.getInstance().getSelectedDevice();
//Check selected device
if (device == null) return;
Service avtService = device.findService(SystemManager.AV_TRANSPORT_SERVICE);
if (avtService != null) {
ControlPoint cp = SystemManager.getInstance().getControlPoint();
cp.execute(new Play(avtService) {
@Override
public void success(ActionInvocation invocation) {
Log.i(TAG, "Play success.");
}
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
Log.e(TAG, "Play failed");
}
});
}
}
开发者ID:kevinshine,项目名称:BeyondUPnP,代码行数:22,代码来源:PlaybackCommand.java
示例3: start
import org.fourthline.cling.support.avtransport.callback.Play; //导入依赖的package包/类
@Override
public void start() {
if(error) {
Log.w(TAG, "Attempting to restart song");
startSong(downloadService.getCurrentPlaying(), true, 0);
return;
}
try {
controlPoint.execute(new Play(getTransportService()) {
@Override
public void success(ActionInvocation invocation) {
lastUpdate.set(System.currentTimeMillis());
downloadService.setPlayerState(PlayerState.STARTED);
}
@Override
public void failure(ActionInvocation actionInvocation, UpnpResponse upnpResponse, String msg) {
Log.w(TAG, "Failed to start playing: " + msg);
failedLoad();
}
});
} catch(Exception e) {
Log.w(TAG, "Failed to start", e);
}
}
开发者ID:popeen,项目名称:Popeens-DSub,代码行数:27,代码来源:DLNAController.java
示例4: commandPlay
import org.fourthline.cling.support.avtransport.callback.Play; //导入依赖的package包/类
@Override
public void commandPlay()
{
if (getAVTransportService() == null)
return;
controlPoint.execute(new Play(getAVTransportService()) {
@Override
public void success(ActionInvocation invocation)
{
Log.v(TAG, "Success playing ! ");
// TODO update player state
}
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2)
{
Log.w(TAG, "Fail to play ! " + arg2);
}
});
}
开发者ID:trishika,项目名称:DroidUPnP,代码行数:22,代码来源:RendererCommand.java
注:本文中的org.fourthline.cling.support.avtransport.callback.Play类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论