ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

[HLS] Video not playing on Kindle Fire HDX Tablet

Open fougere-mike opened this issue 11 years ago • 15 comments

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).

fougere-mike avatar Apr 13 '15 20:04 fougere-mike

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.

ojw28 avatar Apr 13 '15 20:04 ojw28

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?

fougere-mike avatar Apr 13 '15 21:04 fougere-mike

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.

ojw28 avatar Apr 13 '15 22:04 ojw28

Ah, okay -- thanks for the clarification.

fougere-mike avatar Apr 13 '15 22:04 fougere-mike

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.

tao-li06 avatar Jul 07 '15 07:07 tao-li06

@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 :)

lsale avatar Jul 10 '15 10:07 lsale

Has anyone heard anything from Amazon on this issue?

acgourley avatar Aug 01 '15 18:08 acgourley

Personally, I'm falling back to MediaPlayer on these devices, for some reason that implementation works OK with HLS, slightly longer buffering times though.

andreimarinescu avatar Aug 03 '15 08:08 andreimarinescu

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.

mpatt3970 avatar Oct 01 '15 22:10 mpatt3970

Has anyone tested this on Fire OS 5?

mpatt3970 avatar Oct 01 '15 23:10 mpatt3970

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).

ojw28 avatar Oct 02 '15 10:10 ojw28

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 avatar Oct 02 '15 10:10 ojw28

@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!

theBradfo avatar Jan 05 '16 14:01 theBradfo

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.

ojw28 avatar Jan 05 '16 14:01 ojw28

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.

srikieonline avatar Apr 19 '16 00:04 srikieonline