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, 2022 in Others by polo
• 1,480 points
1,538 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, 2022 by nisha
• 2,210 points

Related Questions In Others

0 votes
1 answer

Why am I not being able to read the Excel sheet in my Jupyter Notebook

Verify that it is actually in your ...READ MORE

answered Mar 28, 2023 in Others by Kithuzzz
• 38,020 points
580 views
+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
1,320 views
0 votes
0 answers

Application Error Is a directory (file:///#android_asset/www/index.html)

I'm using PhoneGap to create an Android ...READ MORE

Jul 8, 2022 in HTML by Tejashwini
• 3,820 points
382 views
0 votes
1 answer

How to change the jquery mobile flip switch state from code

I've examined the page you posted and ...READ MORE

answered Aug 1, 2022 in Web Development by rajatha
• 7,680 points
616 views
0 votes
0 answers
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
683 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, 2022 in Others by nisha
• 2,210 points
2,338 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, 2022 in Others by nisha
• 2,210 points
1,504 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP