mozilla-mobile / firefox-tv

Firefox for Amazon's Fire TV
https://blog.mozilla.org/blog/2017/12/20/firefox-is-now-on-amazon-fire-tv-happy-holiday-watching/
Mozilla Public License 2.0
252 stars 108 forks source link

Release WebView player resources #16

Open liuche opened 6 years ago

liuche commented 6 years ago

Reference: https://developer.amazon.com/docs/fire-tv/faq-general.html

Under "Media Playback":

If your app plays video through an Android WebView (with the

Sdaswani commented 6 years ago

@liuche @mcomella AFAICT we don't have any direct reference to a MediaPlayer object, so not sure how we release it per this. Also, even if we did have a reference, doesn't it make sense to delegate / trust that the Amazon Webview would handle this? All the docs referenced here say if you are using Android Webview, you have to explicitly release, but it doesn't say anything about Amazon Webview. I can also check with our Amazon contact on this.

Sdaswani commented 6 years ago

Not necessary for release.

mcomella commented 6 years ago

This SO post indicates just watching an HTML5 video can create a leaked MediaPlayer instance on some devices: https://stackoverflow.com/a/27262514/2219998

bbinto commented 6 years ago

@Sdaswani to follow up again with Andy

Sdaswani commented 6 years ago

Sorry - they answered this already, but I forgot to put their answer here: "You asked earlier about whether or not you need to release media resources if you’re using Amazon Web View. The answer is yes. AWV is built on Android Web View, so you’ll need to follow the same guidelines."