Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5473] Android: HTML5 video gets stuck while trying to load the video (on webview)

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionNeeds more info
Resolution Date2013-10-17T21:31:55.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sn/a
ComponentsAndroid
Labelsexalture, parity
ReporterKarol Pomaski
AssigneeIngo Muschenetz
Created2011-10-10T07:14:16.000+0000
Updated2017-03-22T22:30:03.000+0000

Description

Problem

Video streaming (HTML5) does not work on webview. While trying to play the HTML5 video it gets stucked in the loading part. While entering to the HTML5 through the Android browser we are able to play the video correctly.

Reproducible Steps

1. Execute the example code 2. Press the Play button on the video (on the top of the page)

Sample Code

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');


var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var webview = Titanium.UI.createWebView({
    url: 'http://videojs.com/' //http://vimeo.com/6759504
});

win1.add(webview);
win1.open();

Logs - tested on devices with Android 2.2.1

12-20 10:46:36.402: I/KeyInputQueue(175): Enqueueing touch event0
12-20 10:46:36.402: I/WindowManager(175): Read next event 0
12-20 10:46:36.402: I/WindowManager(175): Delivering pointer 0 > Window{4a0534c0 com.app.test/com.app.test.TestActivity paused=false}
12-20 10:46:36.612: I/KeyInputQueue(175): Enqueueing touch event1
12-20 10:46:36.612: I/WindowManager(175): Read next event 1
12-20 10:46:36.612: I/WindowManager(175): Delivering pointer 1 > Window{4a0534c0 com.app.test/com.app.test.TestActivity paused=false}
12-20 10:46:36.702: V/AudioFlinger(94): Track constructor name 4100, calling thread 175
12-20 10:46:36.702: V/AudioFlinger(94): start(4100), calling thread 175
12-20 10:46:36.702: V/AudioFlinger(94): ? => ACTIVE (4100) on thread 0x130a8
12-20 10:46:36.702: V/AudioPolicyManager(94): startOutput() output 1, stream 1
12-20 10:46:36.702: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:36.702: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:36.702: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:36.702: V/AudioPolicyManager(94): getDeviceForStrategy() from cache strategy 0, device 2
12-20 10:46:36.702: V/AudioPolicyManager(94): getNewDevice() selected device 2
12-20 10:46:36.702: V/AudioPolicyManager(94): setOutputDevice() output 1 device 2 force 0 delayMs 0
12-20 10:46:36.702: V/AudioPolicyManager(94): setOutputDevice() setting same device 2 or null device for output 1
12-20 10:46:36.702: V/AudioFlinger(94): mWaitWorkCV.broadcast
12-20 10:46:36.702: V/AudioFlinger(94): MixerThread 0xbb38 TID 151 waking up
12-20 10:46:36.702: V/AudioPolicyManager(94): releaseOutput() 1
12-20 10:46:36.702: V/AudioFlinger(94): remove track (4099) and delete from mixer
12-20 10:46:36.702: V/AudioFlinger(94): PlaybackThread::Track destructor
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): open driver
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): get config
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): set config
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): buffer_size: 4800
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): buffer_count: 2
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): channel_count: 2
12-20 10:46:36.732: V/AudioHardwareMSM72XX(94): sample_rate: 44100
12-20 10:46:36.892: W/AudioFlinger(94): write blocked for 166 msecs, 154 delayed writes, thread 0xbb38
12-20 10:46:37.122: I/Web Console(18326): Video is not ready yet (try playing the video first). at http://videojs.com/video-js/video.js?v=1292016568:116
12-20 10:46:37.162: V/AudioFlinger(94): getNextBuffer() no more data for track 4100 on thread 0xbb38
12-20 10:46:37.162: V/AudioFlinger(94): stop(4100), calling thread 175
12-20 10:46:37.162: V/AudioFlinger(94): (> STOPPED) => STOPPED (4100) on thread 0xbb38
12-20 10:46:37.162: V/AudioPolicyManager(94): stopOutput() output 1, stream 1
12-20 10:46:37.162: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:37.162: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:37.162: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:37.162: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:37.162: V/AudioPolicyManager(94): getNewDevice() selected device 0
12-20 10:46:37.162: V/AudioPolicyManager(94): setOutputDevice() output 1 device 0 force 0 delayMs 150
12-20 10:46:37.162: V/AudioPolicyManager(94): setOutputDevice() setting same device 0 or null device for output 1
12-20 10:46:37.192: V/AudioFlinger(94): TrackBase::reset
12-20 10:46:40.172: V/AudioFlinger(94): Audio hardware entering standby, mixer 0xbb38, mSuspended 0
12-20 10:46:40.192: V/AudioFlinger(94): MixerThread 0xbb38 TID 151 going to sleep
12-20 10:46:40.582: W/TiAnalyticsSvc(18326): (Thread-56) [29606,29606] Analytics Service Started
12-20 10:46:40.662: I/TiAnalyticsSvc(18326): (Thread-56) [84,29690] Sending 2 analytics events.
12-20 10:46:41.482: W/TiAnalyticsSvc(18326): (Thread-56) [821,30511] Stopping Analytics Service
12-20 10:46:42.422: I/KeyInputQueue(175): Enqueueing touch event0
12-20 10:46:42.422: I/WindowManager(175): Read next event 0
12-20 10:46:42.422: I/WindowManager(175): Delivering pointer 0 > Window{4a0534c0 com.app.test/com.app.test.TestActivity paused=false}
12-20 10:46:42.622: I/KeyInputQueue(175): Enqueueing touch event1
12-20 10:46:42.622: I/WindowManager(175): Read next event 1
12-20 10:46:42.622: I/WindowManager(175): Delivering pointer 1 > Window{4a0534c0 com.app.test/com.app.test.TestActivity paused=false}
12-20 10:46:42.892: D/BatteryService(175): update start
12-20 10:46:42.892: D/BatteryService(175): update start
12-20 10:46:42.902: D/BatteryService(175): update start
12-20 10:46:43.022: V/AudioFlinger(94): Track constructor name 4099, calling thread 175
12-20 10:46:43.022: V/AudioFlinger(94): start(4099), calling thread 175
12-20 10:46:43.022: V/AudioFlinger(94): ? => ACTIVE (4099) on thread 0x13488
12-20 10:46:43.022: V/AudioPolicyManager(94): startOutput() output 1, stream 1
12-20 10:46:43.022: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.022: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.022: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.022: V/AudioPolicyManager(94): getDeviceForStrategy() from cache strategy 0, device 2
12-20 10:46:43.022: V/AudioPolicyManager(94): getNewDevice() selected device 2
12-20 10:46:43.022: V/AudioPolicyManager(94): setOutputDevice() output 1 device 2 force 0 delayMs 0
12-20 10:46:43.022: V/AudioPolicyManager(94): setOutputDevice() setting same device 2 or null device for output 1
12-20 10:46:43.022: V/AudioFlinger(94): mWaitWorkCV.broadcast
12-20 10:46:43.022: V/AudioFlinger(94): MixerThread 0xbb38 TID 151 waking up
12-20 10:46:43.022: V/AudioPolicyManager(94): releaseOutput() 1
12-20 10:46:43.022: V/AudioFlinger(94): remove track (4100) and delete from mixer
12-20 10:46:43.022: V/AudioFlinger(94): PlaybackThread::Track destructor
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): open driver
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): get config
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): set config
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): buffer_size: 4800
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): buffer_count: 2
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): channel_count: 2
12-20 10:46:43.052: V/AudioHardwareMSM72XX(94): sample_rate: 44100
12-20 10:46:43.222: W/AudioFlinger(94): write blocked for 166 msecs, 155 delayed writes, thread 0xbb38
12-20 10:46:43.482: V/AudioFlinger(94): getNextBuffer() no more data for track 4099 on thread 0xbb38
12-20 10:46:43.492: V/AudioFlinger(94): stop(4099), calling thread 175
12-20 10:46:43.492: V/AudioFlinger(94): (> STOPPED) => STOPPED (4099) on thread 0xbb38
12-20 10:46:43.492: V/AudioPolicyManager(94): stopOutput() output 1, stream 1
12-20 10:46:43.492: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.492: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.492: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.492: E/AudioPolicyManagerBase(94): unknown stream type
12-20 10:46:43.492: V/AudioPolicyManager(94): getNewDevice() selected device 0
12-20 10:46:43.492: V/AudioPolicyManager(94): setOutputDevice() output 1 device 0 force 0 delayMs 150
12-20 10:46:43.492: V/AudioPolicyManager(94): setOutputDevice() setting same device 0 or null device for output 1
12-20 10:46:43.512: V/AudioFlinger(94): TrackBase::reset
12-20 10:46:46.502: V/AudioFlinger(94): Audio hardware entering standby, mixer 0xbb38, mSuspended 0
12-20 10:46:46.512: V/AudioFlinger(94): MixerThread 0xbb38 TID 151 going to sleep

Associated HelpDesk Ticket

http://appc.me/c/APP-442427

Comments

  1. Shak Hossain 2012-01-24

    Changing customer priority for the next patch.
  2. Junaid Younus 2012-05-16

    Tested with 2.0.1GA2 on a HTC Sensation 4G, issue still exists. Tested on the iOS simulator, seems to work fine. Added 'parity' to the label.
  3. Sunila 2013-07-30

    Tested with Android nexus 4.3, even the native browser doesn't play the video http://videojs.com/
  4. Ping Wang 2013-10-11

  5. Ingo Muschenetz 2013-10-17

    It appears this does not work in native Android. Can we get confirmation this is actually possible?
  6. Lee Morris 2017-03-22

    Closing ticket due to the information that was requested was not provided.

JSON Source