4
我有一個非常簡單的HTML5視頻流應用程序,用於使用Phonegap構建的Android。我正在測試的設備是Samsung Galaxy Tab 2.視頻根本不流。我看到了Eclipse的logcat窗口上的以下錯誤:RTSP與HTML5視頻流導致服務器在Android上死亡錯誤(100,0)
02-22 09:34:56.489: D/HTML5VideoView(6029): requestAudioFocus() called. proxy = Handler (android.webkit.HTML5VideoViewProxy) {4176a958}
02-22 09:34:56.489: D/HTML5VideoView(6029): requested AudioFocus. videoView = [email protected]
02-22 09:34:56.512: V/MotionRecognitionManager(6029): .registerListenerEvent : success. listener count = 0->1, motion_sensors=1, [email protected]
02-22 09:35:04.504: E/MediaPlayer(6029): internal/external state mismatch corrected
02-22 09:35:04.504: W/IMediaDeathNotifier(6029): media server died
02-22 09:35:04.504: W/AudioSystem(6029): AudioFlinger server died!
02-22 09:35:04.504: E/MediaPlayer(6029): error (100, 0)
02-22 09:35:04.551: E/MediaPlayer(6029): Error (100,0)
*******************************************************************************************
Here's my HTML code and Javascript code:
<script src="cordova-2.4.0.js"></script>
<script>
function onLoad(){
document.addEventListener("deviceready", onDeviceReady, true);
}
function onDeviceReady(){
navigator.notification.alert("PhoneGap is working!!");
}
</script>
</head>
<body onload="onLoad();">
<h1>Digital Home HTML5 Video Streaming Test</h1>
<video preload="metadata" src="rtsp://nnn.nnn.nnn.nnn/stream1" controls></video>
</body>
我想知道如果這是因爲服務器在開始實際流是之前發送短介紹視頻(或海報)被Galaxy選項卡解釋爲服務器已經死亡。我不知道我應該添加一個偵聽器來處理這種行爲。如果我爲結束事件添加一個監聽器,我可能最終會在無限循環中旋轉?該流在我從Android市場下載的iPad和另一個RTSP播放器上正常工作。我錯過了什麼?
我能夠用VLC播放流這樣的SDP描述必須確定
感謝