how to implement youtube videos in AMP-html - youtube

I am trying to implement youtube videos within AMP articles by following the official documentation found here:
https://github.com/ampproject/amphtml/blob/master/extensions/amp-youtube/amp-youtube.md
But the youtube video is simply not rendering at all.
Here is what my Jade template looks like:
amp-youtube(data-videoid="#{videoId}", layout="responsive", width="480", height="270")
and the output is this:
<amp-youtube data-videoid="lZShEy8ILvg" layout="responsive" width="480" height="270"></amp-youtube>
It looks to be fine but I'm not sure why the youtube video is not being inserted into the amp-youtube tag.
Any suggestions are well appreciated!

Nevermind, I forgot to add the amp-youtube script in the document head...

Related

Send a mail that displays a video in Ruby on Rails

I need to display a video inside of a mail (coded in an html.erb file). I have tried this with an iframe tag, but it doesn't work (the same code works in a normal html page, so I'm sure that the mistake doesn't come from here). Is it possible to do it without any gem ? Which tag should I use then ?
The website is coded in rails 4.2. The source of the video is a youtube link.
Thank you very much for your help !
PS: I have searched for an answer, yet, if I missed a related topic, I'll be glad for you to give me the link.

Embedding Youtube videos not working with Node-webkit

I have an embedded youtube video in my nw.js app. The preview for the correct video shows up properly but when I click to play it I am met with the following error:
An error occurred, please try again later
All of the videos in the app get this error, except for one that gets this puzzling error:
The following video contains content from the International Basketball Federation
When I click these videos, I can see the first split second of the video before the error shows up.
I tried enabling/disabling the webkit plugin in the manifest:
"webkit": {
"plugin": true
}
and I tried using the Javascript Player API as suggested by in this post. However I still get the same errors.
How can I get these videos to play properly?
Here is the HTML (I'm using angularJS and the video is in a modal window) that displays the video:
<script type="text/ng-template" id="myModalContent.html">
<object width="100%" height="600px" data={{video}}>
</object>
</script>
I also tried copying this example using the Javascript Player API and even tried using the same video as the example but I'm still getting the same error.
Thank you very much for your time. Let me know if you need anything else from me or if I am being unclear.
Ok so the issue was the ffmpegsumo.dll. At first I tried replacing it with the dll from chrome 39 and 42 and that did not fix my issue. After replacing the file with the ffmpegsumo.dll from Chrome 38.0.2125.122, my issue was fixed and videos played as expected.
Chrome 38.0.2125.122 ffmpegsumo.dll 32 bit
Chrome 38.0.2125.122 ffmpegsumo.dll 64 bit
You need the flash plugins in the plugins directory at the same root level as the package.json NPSWF32_13_0_0_214.dlland NPSWF32_14_0_0_125.dll. This with the above will enable Flash.
Had the same problem in Linux 64 bits using Yeoman Node Webkit Generator (https://github.com/Dica-Developer/generator-node-webkit/wiki/Getting-Started)
Just fixed it by adding the so lib:
$ cp nwjs/nwjs-v0.12.0-linux-x64/libffmpegsumo.so dist/Linux64_v0.12.0/

Remove Youtube Annotation Using iv_load_policy=3

I am appending iv_load_policy=3 to the end of my YouTube URL to remove the annotations on the video, but I find it is not working. Looking on Google, it seems like this issue was addressed a year ago. I am wondering if anyone knows if this bug is back or if there is a work around?
I have tested on Chrome, FF, Safari, and IE9 on Win7.
http://www.youtube.com/watch?v=87kezJTpyMI&hd=1&iv_load_policy=3
https://developers.google.com/youtube/player_parameters#iv_load_policy
You can only use the iv_load_policy when embedding videos using one of the player apis - you can't just change the youtube watch page url.
For example, if you wanted to embed the video you linked above without annotations, you could use this link:
http://www.youtube.com/embed/87kezJTpyMI?hd=1&iv_load_policy=3
Cheers. Wanted to remove the annotations as well from the embedded Youtube video's. Just added &iv_load_policy=3 to the end of the videos URL. Works like a charms :D
Use this in an extension
$("div.video-annotations").css("display", "none");
Or this in Stylebot extension
div.video-annotations {display:none;}

PrettyPhoto Error: Image cannot be loaded. Make sure the path is correct and the image exists

I've searched a series of forums and I've noticed that a lot of people had this same issue. I tried all the resolutions: using the longer Youtube URL like
http://www.youtube.com/watch?v=GkqS5DiF2_A
defining the width and height of the image, and I've tried using older versions of JQuery. I'm still receiving the error. I've linked all the images in the CSS file [incorrectly, but they are linked :)]. I've been trying to solve this for days and I'm not sure what I'm doing wrong.
Any help would be greatly appreciated. Thank you!
It appears that you have to add ?iframe=true to the end of the hyperlink
https://stackoverflow.com/===>http://stackoverflow.com?iframe=true
did the trick for me. Make sure you point direct to the web page you want to appear in the light box, not to the iframe.
I had the issue with WordPress,
I simply removed the alert.
file: /wp-content/plugins/prettyphoto-media/js/jquery.prettyPhoto.min.js
I use http://jsbeautifier.org/ to unfold the code
and comment line 350:
//alert("Image cannot be loaded. Make sure the path is correct and image exist.");
The links to the youtube video are not direct, you are using some kind of redirects. i suggest you use direct links to the youtube video
here is a demo of your site http://www.mediafire.com/?vj3l062uza7ov61 , see the left video

How to play video from epub file?

i want to create an epub reader with feature like play video and audio from my iphone app.
One more thing i would like to say that it will not a web based applicaton.
i mean to say that i dont want to use uiwebview.
please any body help me thanx in adv.
EPUB3 supports tag, http://idpf.org/epub/30/spec/epub30-overview.html#sec-multimedia
So you can embed video like this:
<video id="my_video_1" width="720" height="365" preload="auto" controls="true">
<source src="../Misc/my_video_1.m4v" />
</video>
And, H.264 or VP8 video codecs are recoomended.
http://idpf.org/epub/30/spec/epub30-publications.html#note-video-codecs
The epub format is wrapped as a zip file (you can just unzip it). There was a lot of discussion about it in this thread:
Reading ePub format
So you can just add the audio/video in the zip and then runnit locally using MPMoviePlayer. If you want to be able to actually show the book you must re-implement a web engine, as epub books uses HTML to diagram. So, as far as I know, the UIWebView is the easiest way to go.

Resources