2015-11-24 82 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); 
} 
相關問題