+ 1
I embedded a youtube video in a html coding...but it showed an error.can anyone tell me why?
you can see the coding in my profile. the coding is named like this-'youtube video'.Please give me a solution so that I can attach more YouTube videos
29 Answers
+ 2
It must be
https://www.youtube.com/embed/KOCQRkc5fDA
+ 1
then we are the two persons sailing on the same boat
+ 1
I have done my html course.but i am having a problem in attaching youtube videos..
+ 1
yes..u are right.
+ 1
are you from India.
+ 1
you didn't answered my question..
+ 1
are you from India
+ 1
why are you angry..
+ 1
just chill
+ 1
from which state??
+ 1
I don't understand what you said..šš
+ 1
why don't you want to chat here
+ 1
sameer poswal
Here's an example of a video that works:
https://code.sololearn.com/W2dQpsafNWav/?ref=app
PS: Some chatting inevitably occurs in threads, but keep in mind that these posts are viewable outside of the SoloLearn app because they are accessible via the SoloLearn website. Conversing is more appropriate for personal feed posts or in Code Playground project comments. That way people who have similar questions can look up the answer without having to sift through all the noise.
PPS: SoloLearn discourages sharing of information that is too personal here. If someone doesn't feel comfortable responding to your probing questions, try not to push it.
+ 1
Here's one using the javascript API (it lets me know when the video loads, for example). Since the code is more complex, maybe all you really need to test is if one of the three videos will play (change "selectedVideo" [JS] line 5 to a number from 0-2).
https://code.sololearn.com/WY2xou48ucG4/?ref=app
I believe they have low restrictions (like not region-restricted) so maybe this will help add insight.
0
While Toni's link is correct, the video still won't play, most likely because the video publisher has not allowed embedding. It will say that the video is unavailable.
0
Please see earlier post:
"While Toni's link is correct, the video still won't play, most likely because the video publisher has not allowed embedding. It will say that the video is unavailable."
0
Incidentally, your video loads in my code but then shows "unavailable" just like Janningā 's.
Embedding in the first place (I think, regardless of a video restriction) is failing in your code because the origin document is "about:blank" (inside the webview) and not "youtu.be"; that is, you haven't navigated to youtu.be to play it. Historically, this setting is used to prevent others from thinking (e.g., youtu.be) is your content.
Embedding appears to be failing in mine and Janning's for the reason mentioned before : embedding not allowed by the author (different cause).
0
I updated my code to distinguish the single video from the playlist that happens to include the video.
Replacing the current video id in Kirk Schafer 's JavaScript with;
'TMKUqDgLUKA'
and title with;
'welcome'
worked for me.
0
Janningā I just added error reporting; It's throwing an embedding not allowed error for me :(
0
Kirk Schafer
Weird! If it's a regional restriction, would using a VPN bypass it? or do you think the region detector is tied to the Google login?
This is going to bug me. š¤