2015-11-24 83 views
1

我对谷歌的应用程序中播放流媒体形式播放的音乐从最新的科尔多瓦(5.4)建立了一个电台,我使用一些基本的插件,如:科尔多瓦媒体插件停止在Android上工作6

  • 设备插件
  • 人行横道的WebView插件
  • 对话框插件
  • ...
  • 文件插件
  • 媒体插件

在Android 5.0+上,流媒体工作正常,但最近当我在Android 6.0上升级我的连接时,流式传输停止了。我更新了媒体和文件插件到最新版本(分别为2.0.0和4.0.0),正如cordova在他们的博客中所述,这些版本支持Android 6上的新权限检查,但仍然无法正常工作。日志给了我这样的:

11-24 23:53:35.347 15184-15184/com.uni.app E/chromium: [ERROR:xwalk_autofill_client.cc(170)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved() 
11-24 23:53:40.395 15184-15235/com.uni.app D/MediaPlayer: setSubtitleAnchor in MediaPlayer 
11-24 23:53:40.410 15184-15235/com.uni.app W/MediaPlayer: Stream has no duration and is therefore not seekable. 
11-24 23:53:40.410 15184-15235/com.uni.app E/MediaPlayer: error (-2147483648, 0) 
11-24 23:53:40.410 15184-15235/com.uni.app D/AudioPlayer: Send a onStatus update for the new seek 
11-24 23:53:40.410 15184-15235/com.uni.app W/CordovaPlugin: Attempted to send a second callback for ID: Media951412725 Result was: {"action":"status","status":{"id":"d5334ff7-5511-ea09-b2ef-2900789941a9","msgType":3,"value":0}} 
11-24 23:53:40.411 15184-15235/com.uni.app E/MediaPlayer: start called in state 0 
11-24 23:53:40.411 15184-15235/com.uni.app E/MediaPlayer: error (-38, 0) 
11-24 23:53:40.412 15184-15235/com.uni.app W/CordovaPlugin: Attempted to send a second callback for ID: Media951412725 Result was: {"action":"status","status":{"id":"d5334ff7-5511-ea09-b2ef-2900789941a9","msgType":1,"value":2}} 
11-24 23:53:40.412 15184-15235/com.uni.app E/MediaPlayer: Attempt to call getDuration without a valid mediaplayer 
11-24 23:53:40.412 15184-15235/com.uni.app E/MediaPlayer: error (-38, 0) 
11-24 23:53:40.412 15184-15235/com.uni.app W/CordovaPlugin: Attempted to send a second callback for ID: Media951412725 Result was: {"action":"status","status":{"id":"d5334ff7-5511-ea09-b2ef-2900789941a9","msgType":2,"value":314586.9375}} 
11-24 23:53:40.413 15184-15235/com.uni.app E/MediaPlayer: Error (-2147483648,0) 
11-24 23:53:40.413 15184-15235/com.uni.app D/AudioPlayer: on completion is calling stopped 
11-24 23:53:40.414 15184-15235/com.uni.app W/CordovaPlugin: Attempted to send a second callback for ID: Media951412725 Result was: {"action":"status","status":{"id":"d5334ff7-5511-ea09-b2ef-2900789941a9","msgType":1,"value":4}} 
11-24 23:53:40.414 15184-15235/com.uni.app E/MediaPlayer: Error (-38,0) 
11-24 23:53:40.414 15184-15235/com.uni.app D/AudioPlayer: on completion is calling stopped 
11-24 23:53:40.414 15184-15235/com.uni.app E/MediaPlayer: Error (-38,0) 
11-24 23:53:40.414 15184-15235/com.uni.app D/AudioPlayer: on completion is calling stopped 
11-24 23:53:53.476 15184-15184/com.uni.app E/chromium: [ERROR:xwalk_autofill_client.cc(170)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved() 
11-24 23:53:58.409 15184-15232/com.uni.app E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaed05f70 
11-24 23:53:58.419 15184-15184/com.uni.app W/ScreenOrientationListener: Removing an inexistent observer! 
11-24 23:53:58.419 15184-15184/com.uni.app E/chromium: [ERROR:runtime_javascript_dialog_manager.cc(69)] Not implemented reached in virtual void xwalk::RuntimeJavaScriptDialogManager::ResetDialogState(content::WebContents*) 
11-24 23:53:58.453 15184-15184/com.uni.app D/AudioPlayer: renaming /storage/emulated/0/tmprecording.3gp to /storage/emulated/0/http://IPADDRESS:PORT/; 
11-24 23:53:58.454 15184-15184/com.uni.app E/AudioPlayer: FAILED renaming /storage/emulated/0/tmprecording.3gp to /storage/emulated/0/http://IPADDRESS:PORT/; 
11-24 23:53:58.465 15184-15197/com.uni.app E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb3978f90 

IPADDRESS:PORT是一个真正的http://ipaddress:port URL流,工作正常。

我现在必须做的权限,但仍然没有找到到底什么运气。继续应用程序信息和新的权限菜单我看到该应用程序使用麦克风,手机和存储的权限,这些都是启用的。我搜查了很多,无法找到类似的东西。

任何帮助表示赞赏

+0

您正在使用哪种媒体插件版本?今天发布了一个新版本,支持android 6支持 – jcesarmobile

+0

@jcesarmobile我在我的问题中回答了这个问题。它的媒体v2.0.0这是版本科尔多瓦发布,以支持Android 6. –

+0

哦,对不起,没有读过。你能显示你使用的代码吗?您说这不是人行横道,但是您显示的错误与人行横道有关,如果您移除人行横道,您能否显示出现的错误? – jcesarmobile

回答

1

官方回购经过在Github上,发现this

试穿了新的示例应用程序,并在我的Android运行良好6.0设备。这个解决方案接近于什么结果,以及一些额外的评论。

0

好像有些不对劲从人行横道,你有没有尝试,如果你删除人行横道插件?你的Android 6.0设备是64位的吗?

+0

嗨,它不在人行横道插件上。我尝试删除人行横道,我得到完全相同的日志,但没有关于人行横道的消息。这是媒体元素和文件插件失败。 –

2

我发现这个问题,只是评论AudioPlayer.java

此行
public void onPrepared(MediaPlayer player) { 
    // Listen for playback completion 
    this.player.setOnCompletionListener(this); 
    // seek to any location received while not prepared 
    //this.seekToPlaying(this.seekOnPrepared); 
    // If start playing after prepared 
    if (!this.prepareOnly) { 
     this.player.start(); 
     this.setState(STATE.MEDIA_RUNNING); 
     this.seekOnPrepared = 0; //reset only when played 
    } else { 
     this.setState(STATE.MEDIA_STARTING); 
    } 
    // Save off duration 
    this.duration = getDurationInSeconds(); 
    // reset prepare only flag 
    this.prepareOnly = true; 

    // Send status notification to JavaScript 
    sendStatusChange(MEDIA_DURATION, null, this.duration); 
} 
相关问题