[HLS] Video not playing on Kindle Fire HDX Tablet
Hi, we've been having trouble getting video to play on our Kindle Fire HDX tablets with ExoPlayer. It is currently working on all our other devices (including amazon FireTV).
It seems that at some point the AudioTrack will return a playbackHeadPosition which is less than the previous value. It then gets stuck and always returns that same number:
04-13 16:05:14.040 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=4742
04-13 16:05:14.040 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=4777
04-13 16:05:14.040 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=4777
04-13 16:05:14.040 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=4788
04-13 16:05:14.050 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=3840
04-13 16:05:14.060 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=3840
04-13 16:05:14.060 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=3840
04-13 16:05:14.060 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=3840
04-13 16:05:14.060 27461-27790/? E/AudioTrack﹕ getPlaybackHeadPosition(): rawPlaybackHeadPosition=3840
The playbackHeadPosition moving backwards is interepreted as an integer wrap, and results in the player reporting a position of >24hrs regardless of the true position and duration of the video.
From the user's perspective, the video plays for ~3 seconds, then jumps to 24 hours and freezes.
When the MediaCodecAudioTrackRenderer is disabled, video plays correctly (but with no sound obviously).
Sounds like a device specific issue. Since Kindle Fire tablets aren't official Android devices, we do not provide support. You'd have to report the issue to Amazon and get them to fix the underlying problem.
Ok... does this mean that ExoPlayer is only supported on google devices (i.e. nexus*)? If it stops working on a Galaxy Tab, will you guys be fixing the problem?
Or, are you specifically not supporting amazon devices?
We aim to support all devices that run Android. This means (roughly speaking) that the device has passed Android CTS and that the device has been approved based on this. Any device that ships with Play Store is definitely in this category. There also exist devices that do not ship with Play Store that fall into this category. Amazon devices run FireOS, which is a fork of Android. To my knowledge they do not go through the approval process.
In any case, you'll need to report this to Amazon and ask that they fix the underlying problem.
Ah, okay -- thanks for the clarification.
I am writing my own player to support DASH on all 4.0+ devices, however I have the same problem on Amazon devices, seems AudioTrack.getPlaybackHeadPosition returns incorrect header position, so that I can estimate how much data is pending in AudioTrack to play. What's more, AudioTrack.write() on Amazon devices is not a blocking method, it will flush the data in the head while buffer is full. So I just blacklist Amazon devices as well.
@kkk0612 and @fougere-mike could you please use this link and log the issue with Amazon? https://developer.amazon.com/appsandservices/support/contact/contact-us Feel free to tell the support I told you to do that :)
Has anyone heard anything from Amazon on this issue?
Personally, I'm falling back to MediaPlayer on these devices, for some reason that implementation works OK with HLS, slightly longer buffering times though.
Hey, I saw an identical issue with a different video player library. When we added player.setForceOMXdecoding(true), it started working with the Fire tablets perfectly. Now my project is in the middle of a switch to ExoPlayer and this issue has reappeared. Very frustrating.
Has anyone tested this on Fire OS 5?
I gave OS5 a try and it seemed that the demo app now works correctly (so I would guess other ExoPlayer based apps will work correctly too).
Marking wont-fix because I believe OS5 resolves the problem. Although given the issue is closed already, I guess that was a bit pointless :)!
@ojw28 sorry to revisit this but would it be possible to add or expand upon some docs to denote this issue with Fire OS and ExoPlayer integration? Perhaps I've simply missed it, but it would save a bunch of effort for devs that don't run into this integration issue until late in the QA cycle (like myself)! Thanks!
FireOS isn't Android. It's not really our job to discover and document compatibility issues with devices running other operating systems that attempt to support running of Android applications. If anything, it's up to the author of that operating system to document their compatibility issues.
You could use Amazon's port of Exoplayer from here https://github.com/amzn/exoplayer-amazon-port . This solves this specific issue on Kindle Tablet running on OS4 . This issue is fixed in OS5, but is still a problem in older OS4.