I used this url http://www.youtube.com/embed/uGNhirSbWW0?autoplay=1
to auto play this video in my amazon fireTv app using web View, i am getting the video but the video is not playing automatically? How to auto play the video in amazon firetv. any other way to play the youtube video
Asked
Active
Viewed 1,192 times
1

Grijan
- 287
- 5
- 22
-
Have you got any solution – Bala Saikrupa Puram Sep 23 '20 at 08:57
1 Answers
0
For someone who stumbled upon this problem when using Amazon Web Apps:
Somewhere in your code load Iframe Player API
code
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
Create an iframe and call event.target.playVideo()
when onReady
event fires
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
videoId: 'M7lc1UVf-VE',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}

Blz
- 193
- 1
- 2
- 6