question

bl-eng avatar image
bl-eng asked

HTML5 video jumps to the end

My app is webview which has a video element inside of it. I'm seeing some buggy behavior while seeking. I have the ff button hooked up to jump the video ahead a few seconds. Sometimes this works fine... it will jump ahead and then continue playing from the new time. However sometimes after jumping ahead, it will then jump to the end of the video. I'm logging when I try to seek and when the video throws a 'seeked' event and an 'ended' event along with the videos currentTime. This is what I'm seeing: 05-16 09:26:43.450 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 16.139599990844726 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:43.550 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 16.138999938964844 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:44.771 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 25.648600769042968 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:44.801 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 25.648000717163086 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:46.082 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 33.08960075378418 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:46.303 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 33.0890007019043 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:47.464 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video ended at 45.94599914550781 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:254 Here's the complete log. I am seeing Errors in there, but I'm not sure what they indicate or what I should be doing about them. Any insight anyone can offer would be greatly appreciated! 05-16 09:26:43.450 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 16.139599990844726 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:43.460 30065-30065/com.brightline.previewer I/Web Console﹕ [remote] fast-forward at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/bl/logger.console.js:8 05-16 09:26:43.460 277-31686/? D/AudioSessionOutALSA﹕ pause 05-16 09:26:43.460 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:43.460 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:43.460 277-619/? V/AudioFlinger﹕ setParameters(): io 2, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:43.460 277-619/? V/AudioFlinger﹕ ThreadBase::setParameters() routing=1024 05-16 09:26:43.470 30065-30065/com.brightline.previewer D/MediaPlayer﹕ seekTo() mUri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4 05-16 09:26:43.470 649-662/? D/BluetoothA2dpService﹕ Received ACTION_METADATA_CHANGED 05-16 09:26:43.470 649-662/? D/BluetoothA2dpService﹕ uri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4mUri is null 05-16 09:26:43.470 649-662/? D/BluetoothA2dpService﹕ Internal audio file data, ignoring 05-16 09:26:43.470 277-672/? D/AudioStreamOutALSA﹕ AudioStreamOut: setParameters routing=1024 Standbydevice = 0 activeDevice = 17408 05-16 09:26:43.470 277-672/? D/ALSAStreamOps﹕ setParameters(): keyRouting with device 1024 05-16 09:26:43.470 277-672/? D/ALSAStreamOps﹕ setParameters(): add SPDIF: device 17408 05-16 09:26:43.470 277-672/? V/AudioHardwareALSA﹕ device = 0x4400,mCurDevice 0x4400 05-16 09:26:43.470 277-672/? D/AudioHardwareALSA﹕ doRouting: device 17408 newMode 0 mIsVoiceCallActive 0 mIsFmActive 0 05-16 09:26:43.470 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:43.470 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:43.510 277-31686/? D/AudioSessionOutALSA﹕ Flush 05-16 09:26:43.510 277-31686/? D/AudioSessionOutALSA﹕ flush_l 05-16 09:26:43.520 277-31705/? E/AudioHardwareALSA﹕ error pcm_write returned -77 05-16 09:26:43.520 277-31705/? E/AudioSessionOutALSA﹕ pcm_write returned n < 0 05-16 09:26:43.550 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 16.138999938964844 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:43.570 277-31686/? D/AudioSessionOutALSA﹕ flush X 05-16 09:26:43.570 277-31686/? V/AudioFlinger﹕ DirectAudioTrack::setVolume left: 1.000000, right: 1.000000 05-16 09:26:43.570 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:43.570 277-31695/? W/TimedEventQueue﹕ Event 2 was not found in the queue, already cancelled? 05-16 09:26:43.570 277-619/? V/AudioFlinger﹕ setParameters(): io 1987, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:43.570 277-619/? V/AudioFlinger﹕ setParameters for mAudioTracks size 4 desc 0x4901eac0 05-16 09:26:43.570 277-619/? D/AudioSessionOutALSA﹕ setParameters(): keyRouting with device 17408 05-16 09:26:43.570 277-619/? D/AudioSessionOutALSA﹕ updated mStandByFormats 0 05-16 09:26:43.570 277-619/? D/AudioSessionOutALSA﹕ doRouting: devices 0x4400, mDevices = 0x4400 05-16 09:26:43.570 277-619/? W/AudioSessionOutALSA﹕ Return same device 05-16 09:26:43.570 277-619/? V/AudioFlinger﹕ setParameters:: routing change to device 1024 05-16 09:26:43.580 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:43.580 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:43.580 277-31686/? D/AudioSessionOutALSA﹕ start 05-16 09:26:43.580 277-31686/? D/AudioSessionOutALSA﹕ start: mSessionState 128 05-16 09:26:43.620 649-662/? D/BluetoothA2dpService﹕ Received ACTION_METADATA_CHANGED 05-16 09:26:43.620 649-662/? D/BluetoothA2dpService﹕ uri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4mUri is null 05-16 09:26:43.620 649-662/? D/BluetoothA2dpService﹕ Internal audio file data, ignoring 05-16 09:26:44.561 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~~_remoteListenerOn = true at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:260 05-16 09:26:44.721 277-672/? V/AudioFlinger﹕ releaseWakeLock_l() AudioOut_2 05-16 09:26:44.721 277-672/? V/AudioFlinger﹕ thread 0x405c2008 type 0 TID 672 going to sleep 05-16 09:26:44.771 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 25.648600769042968 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:44.771 30065-30065/com.brightline.previewer I/Web Console﹕ [remote] fast-forward at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/bl/logger.console.js:8 05-16 09:26:44.771 277-31686/? D/AudioSessionOutALSA﹕ pause 05-16 09:26:44.771 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:44.771 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:44.771 277-619/? V/AudioFlinger﹕ setParameters(): io 2, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:44.771 277-619/? V/AudioFlinger﹕ ThreadBase::setParameters() routing=1024 05-16 09:26:44.771 277-672/? V/AudioFlinger﹕ thread 0x405c2008 type 0 TID 672 waking up 05-16 09:26:44.771 277-672/? V/AudioFlinger﹕ acquireWakeLock_l() AudioOut_2 status 0 05-16 09:26:44.771 277-672/? D/AudioStreamOutALSA﹕ AudioStreamOut: setParameters routing=1024 Standbydevice = 0 activeDevice = 17408 05-16 09:26:44.771 277-672/? D/ALSAStreamOps﹕ setParameters(): keyRouting with device 1024 05-16 09:26:44.771 277-672/? D/ALSAStreamOps﹕ setParameters(): add SPDIF: device 17408 05-16 09:26:44.771 277-672/? V/AudioHardwareALSA﹕ device = 0x4400,mCurDevice 0x4400 05-16 09:26:44.771 277-672/? D/AudioHardwareALSA﹕ doRouting: device 17408 newMode 0 mIsVoiceCallActive 0 mIsFmActive 0 05-16 09:26:44.771 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:44.771 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:44.781 30065-30065/com.brightline.previewer D/MediaPlayer﹕ seekTo() mUri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4 05-16 09:26:44.781 649-662/? D/BluetoothA2dpService﹕ Received ACTION_METADATA_CHANGED 05-16 09:26:44.781 649-662/? D/BluetoothA2dpService﹕ uri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4mUri is null 05-16 09:26:44.781 649-662/? D/BluetoothA2dpService﹕ Internal audio file data, ignoring 05-16 09:26:44.801 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 25.648000717163086 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:44.821 277-31686/? D/AudioSessionOutALSA﹕ Flush 05-16 09:26:44.821 277-31686/? D/AudioSessionOutALSA﹕ flush_l 05-16 09:26:44.831 277-31705/? E/AudioHardwareALSA﹕ error pcm_write returned -77 05-16 09:26:44.831 277-31705/? E/AudioSessionOutALSA﹕ pcm_write returned n < 0 05-16 09:26:44.881 277-31686/? D/AudioSessionOutALSA﹕ flush X 05-16 09:26:44.891 277-31686/? V/AudioFlinger﹕ DirectAudioTrack::setVolume left: 1.000000, right: 1.000000 05-16 09:26:44.891 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:44.891 277-31695/? W/TimedEventQueue﹕ Event 3 was not found in the queue, already cancelled? 05-16 09:26:44.891 277-619/? V/AudioFlinger﹕ setParameters(): io 1987, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:44.891 277-619/? V/AudioFlinger﹕ setParameters for mAudioTracks size 4 desc 0x4901eac0 05-16 09:26:44.891 277-619/? D/AudioSessionOutALSA﹕ setParameters(): keyRouting with device 17408 05-16 09:26:44.891 277-619/? D/AudioSessionOutALSA﹕ updated mStandByFormats 0 05-16 09:26:44.891 277-619/? D/AudioSessionOutALSA﹕ doRouting: devices 0x4400, mDevices = 0x4400 05-16 09:26:44.891 277-619/? W/AudioSessionOutALSA﹕ Return same device 05-16 09:26:44.891 277-619/? V/AudioFlinger﹕ setParameters:: routing change to device 1024 05-16 09:26:44.891 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:44.891 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:44.891 277-31686/? D/AudioSessionOutALSA﹕ start 05-16 09:26:44.891 277-31686/? D/AudioSessionOutALSA﹕ start: mSessionState 128 05-16 09:26:44.911 649-662/? D/BluetoothA2dpService﹕ Received ACTION_METADATA_CHANGED 05-16 09:26:44.911 649-662/? D/BluetoothA2dpService﹕ uri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4mUri is null 05-16 09:26:44.911 649-662/? D/BluetoothA2dpService﹕ Internal audio file data, ignoring 05-16 09:26:45.812 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~~_remoteListenerOn = true at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:260 05-16 09:26:46.082 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~seek to 33.08960075378418 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:423 05-16 09:26:46.082 30065-30065/com.brightline.previewer I/Web Console﹕ [remote] fast-forward at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/bl/logger.console.js:8 05-16 09:26:46.082 277-31686/? D/AudioSessionOutALSA﹕ pause 05-16 09:26:46.082 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:46.082 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:46.082 277-619/? V/AudioFlinger﹕ setParameters(): io 2, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:46.082 277-619/? V/AudioFlinger﹕ ThreadBase::setParameters() routing=1024 05-16 09:26:46.092 277-672/? D/AudioStreamOutALSA﹕ AudioStreamOut: setParameters routing=1024 Standbydevice = 0 activeDevice = 17408 05-16 09:26:46.092 277-672/? D/ALSAStreamOps﹕ setParameters(): keyRouting with device 1024 05-16 09:26:46.092 277-672/? D/ALSAStreamOps﹕ setParameters(): add SPDIF: device 17408 05-16 09:26:46.092 277-672/? V/AudioHardwareALSA﹕ device = 0x4400,mCurDevice 0x4400 05-16 09:26:46.092 277-672/? D/AudioHardwareALSA﹕ doRouting: device 17408 newMode 0 mIsVoiceCallActive 0 mIsFmActive 0 05-16 09:26:46.092 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:46.092 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:46.102 30065-30065/com.brightline.previewer D/MediaPlayer﹕ seekTo() mUri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4 05-16 09:26:46.102 649-662/? D/BluetoothA2dpService﹕ Received ACTION_METADATA_CHANGED 05-16 09:26:46.102 649-662/? D/BluetoothA2dpService﹕ uri is http://media.brightline.tv/videos/apps/amex/dtv/intro-video-20130813_low.mp4mUri is null 05-16 09:26:46.102 649-662/? D/BluetoothA2dpService﹕ Internal audio file data, ignoring 05-16 09:26:46.153 277-31689/? I/NuCachedSource2﹕ new range: offset= 6085369 05-16 09:26:46.303 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video seeked to 33.0890007019043 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:258 05-16 09:26:47.314 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~~~~~~~~_remoteListenerOn = true at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:260 05-16 09:26:47.354 277-3725/? I/ChromiumHTTPDataSourceSupport﹕ We requested a content range, but server didn't support that. (responded with 200) 05-16 09:26:47.354 277-31689/? E/NuCachedSource2﹕ source returned error -32, 0 retries left 05-16 09:26:47.364 277-31686/? D/AudioSessionOutALSA﹕ Flush 05-16 09:26:47.364 277-31686/? D/AudioSessionOutALSA﹕ flush_l 05-16 09:26:47.364 277-31705/? E/AudioHardwareALSA﹕ error pcm_write returned -77 05-16 09:26:47.364 277-31705/? E/AudioSessionOutALSA﹕ pcm_write returned n < 0 05-16 09:26:47.414 277-31686/? D/AudioSessionOutALSA﹕ flush X 05-16 09:26:47.414 277-31695/? W/TimedEventQueue﹕ Event 4 was not found in the queue, already cancelled? 05-16 09:26:47.414 277-31686/? V/AudioFlinger﹕ DirectAudioTrack::setVolume left: 1.000000, right: 1.000000 05-16 09:26:47.414 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:47.414 277-619/? V/AudioFlinger﹕ setParameters(): io 1987, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:47.414 277-619/? V/AudioFlinger﹕ setParameters for mAudioTracks size 4 desc 0x4901eac0 05-16 09:26:47.414 277-619/? D/AudioSessionOutALSA﹕ setParameters(): keyRouting with device 17408 05-16 09:26:47.414 277-619/? D/AudioSessionOutALSA﹕ updated mStandByFormats 0 05-16 09:26:47.414 277-619/? D/AudioSessionOutALSA﹕ doRouting: devices 0x4400, mDevices = 0x4400 05-16 09:26:47.414 277-619/? W/AudioSessionOutALSA﹕ Return same device 05-16 09:26:47.414 277-619/? V/AudioFlinger﹕ setParameters:: routing change to device 1024 05-16 09:26:47.414 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:47.414 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:47.414 277-31686/? D/AudioSessionOutALSA﹕ start 05-16 09:26:47.414 277-31686/? D/AudioSessionOutALSA﹕ start: mSessionState 128 05-16 09:26:47.414 30065-30076/com.brightline.previewer E/MediaPlayer﹕ error (1, -1004) 05-16 09:26:47.414 277-31686/? D/AudioSessionOutALSA﹕ pause 05-16 09:26:47.414 277-31686/? E/AudioSessionOutALSA﹕ PAUSE failed for use case Play Tunnel4 05-16 09:26:47.414 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:47.414 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:47.424 277-619/? V/AudioFlinger﹕ setParameters(): io 2, keyvalue routing=1024, tid 619, calling pid 277 05-16 09:26:47.424 277-619/? V/AudioFlinger﹕ ThreadBase::setParameters() routing=1024 05-16 09:26:47.424 277-672/? D/AudioStreamOutALSA﹕ AudioStreamOut: setParameters routing=1024 Standbydevice = 0 activeDevice = 17408 05-16 09:26:47.424 277-672/? D/ALSAStreamOps﹕ setParameters(): keyRouting with device 1024 05-16 09:26:47.424 277-672/? D/ALSAStreamOps﹕ setParameters(): add SPDIF: device 17408 05-16 09:26:47.424 277-672/? V/AudioHardwareALSA﹕ device = 0x4400,mCurDevice 0x4400 05-16 09:26:47.424 277-672/? D/AudioHardwareALSA﹕ doRouting: device 17408 newMode 0 mIsVoiceCallActive 0 mIsFmActive 0 05-16 09:26:47.434 277-31686/? E/AudioPolicyManagerALSA﹕ unknown stream type 05-16 09:26:47.434 277-31686/? I/AudioPolicyManagerALSA﹕ getDeviceForStrategy() speaker device not found for STRATEGY_SONIFICATION 05-16 09:26:47.434 30065-30065/com.brightline.previewer E/MediaPlayer﹕ Error (1,-1004) 05-16 09:26:47.464 30065-30065/com.brightline.previewer I/Web Console﹕ ~~~~~~video ended at 45.94599914550781 at http://192.168.22.113/~stephengiordano/app-amex/targets/firetv/js/views/common.video.base.item.js:254 [b][/b][b][/b][b][/b]
fire tv
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, Can you please provide a sample code of what you are doing and how? Also, is that happening for all media? Are your streaming media from remote location or it is stored in side the apk? Best help should be if you can provide us a sample app that plays video and having seek functionality exactly same like your app and that can reproduce the problem you are facing. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bl-eng avatar image
bl-eng answered
Thanks for the response Sujoy. I did some more testing over the weekend and it seems that the problem was with the videos I was using. I thought they were encoded properly because they seemed to play fine. But skipping around in the video caused problems. I testing using http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 and my problems went away. I'm having my video guys redo the videos for me now. Hopefully that will resolve all my problems! -Steve
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Thanks for the update.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.