We have developed a web app which runs a slideshow containing text, images and video iframe embeds from Youtube and Vimeo. Before adding video embeds, our web app slideshow ran just fine in a React Native app inside WebView deployed to an apk. Our customers could run the slideshow in the Firestick continuously for weeks and weeks without the device going to sleep. We need the device to not sleep because digital signage must always be displayed.
Once adding video to our slideshow, we found that the videos do not autoplay on the Firestick. They autoplay when testing in a normal computer's browser and in the Amazon Web App Tester. However, it did not autoplay in our React Native android app.
So as a stopgap measure, we submitted our web app as a hosted web app to the Amazon app store with "Prevent Sleep for Video Playback" checked. Just like in the Amazon Web App Tester, videos will autoplay. How if the device's sleep checking occurred when a video was not playing, then the Firestick would go to sleep. NickG@Amazon had written in 2015 that a web app could have a tiny hidden video constantly running, but we haven't pursued that option yet.
We are trying to rewrite a React Native app to run the slideshow in a WebView such that videos autoplay but have thus far been unsuccessful. Android emulator will autoplay Youtube and Vimeo videos embedded in an iframe, but Firestick will not auto play videos in sideloaded APK.
So far we have tried setting mediaPlaybackRequiresUserAction to false and allowsInlineMediaPlayback to true. Videos do not auto play in the Firestick.
AndroidManifest.xml has android:hardwareAccelerated="true" added to the application but that didn't make videos auto play in the Firestick.
There must be a way to get videos in iframe in WebView to autoplay in an Android apk for Firestick because it works in the Amazon Web App Tester and Hosted Web Apps on Amazon.
What setting or flag on the native APK will allow iframe embedded videos to autoplay on the Firestick?
Our Firestick is running Fire OS 5.2.72 and Fire TV Home Version 184.108.40.206-012