I am not able to Autoplay youTube video in android chrome

0 votes

I am using IFrame Player API to play youtube videos in my website.

when user clicks a particular link it popups a lightbox and plays video automatically.In Desktop it works fine,and in ios I understand why doesn't it work 

Jun 2 in Others by polo
• 1,500 points
20 views

1 answer to this question.

0 votes

It will play if you set it to autoplay in a muted state.

 For autoplaying would be to instantiate the player with an empty video on page load:

var player = new YT.Player('yt-media-player', {
  height: height,
  width: width,
  videoId: ''
});

Then on the click event of opening the lightbox you can load the particular video and call it to play:

player.loadVideoById(youtubeId);

player.playVideo();
answered Jun 6 by nisha
• 2,160 points

Related Questions In Others

+1 vote
0 answers

I am not able to see the chat box on webinar-session. i can see only ask question pane

Today (8/aug/2020) I have joined one webinar, ...READ MORE

Aug 9, 2020 in Others by Ravibharathi
• 130 points
532 views
0 votes
1 answer

I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome

These errors are usually generated from an ...READ MORE

answered Feb 16 in Others by Soham
• 8,730 points
433 views
0 votes
1 answer

Presenting docket dtates inside html page by javascript

Use the Docker Engine Api:Docker Engine API ...READ MORE

answered Jun 20, 2018 in Docker by DareDev
• 6,890 points
211 views
0 votes
1 answer

Migrating proxy npm repo in nexus 3

I don't think you can achieve this ...READ MORE

answered Jun 22, 2018 in DevOps Tools by DareDev
• 6,890 points
792 views
+1 vote
1 answer

What is the difference between JavaScript and Java

This quote rightly explains that 2 totally ...READ MORE

answered Jun 29, 2018 in Java by Daisy
• 8,120 points
241 views
0 votes
1 answer

How to open YouTube video link in android app?

The below code will do that: Intent intent ...READ MORE

answered Jun 1 in Others by nisha
• 2,160 points
28 views
0 votes
1 answer

How to get current location in google map android

package com.example.sandeep.googlemapsample; import android.content.pm.PackageManager; import android.location.Location; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat; import ...READ MORE

answered Jun 1 in Others by nisha
• 2,160 points
17 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP