+ 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

21st Sep 2018, 8:59 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
29 Answers
21st Sep 2018, 11:26 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
then we are the two persons sailing on the same boat
21st Sep 2018, 9:48 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
I have done my html course.but i am having a problem in attaching youtube videos..
21st Sep 2018, 9:52 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
yes..u are right.
21st Sep 2018, 10:02 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
are you from India.
21st Sep 2018, 10:03 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
you didn't answered my question..
21st Sep 2018, 10:04 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
are you from India
21st Sep 2018, 10:04 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
why are you angry..
21st Sep 2018, 10:07 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
just chill
21st Sep 2018, 10:07 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
from which state??
21st Sep 2018, 10:08 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
I don't understand what you said..šŸ˜‘šŸ˜‘
21st Sep 2018, 10:10 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
why don't you want to chat here
21st Sep 2018, 10:13 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 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.
21st Sep 2018, 12:59 PM
Janningā­
Janningā­ - avatar
+ 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.
21st Sep 2018, 5:47 PM
Kirk Schafer
Kirk Schafer - avatar
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.
21st Sep 2018, 12:24 PM
Janningā­
Janningā­ - avatar
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."
21st Sep 2018, 1:49 PM
Janningā­
Janningā­ - avatar
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).
21st Sep 2018, 6:21 PM
Kirk Schafer
Kirk Schafer - avatar
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.
21st Sep 2018, 6:42 PM
Janningā­
Janningā­ - avatar
0
Janningā­ I just added error reporting; It's throwing an embedding not allowed error for me :(
21st Sep 2018, 6:56 PM
Kirk Schafer
Kirk Schafer - avatar
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. šŸ¤”
21st Sep 2018, 7:06 PM
Janningā­
Janningā­ - avatar