How do flash video downloaders work? - html

Consider the following embed code of this video from Vimeo - Popular video hosting site:
<iframe src="http://player.vimeo.com/video/41321504?title=0&byline=0&portrait=0&color=c8c8c8" width="400" height="300" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
the video embed url(http://player.vimeo.com/video/41321504) does open, if open directly in new browser window but doesn't contain location of video anywhere in html source code, thereby preventing downloads,i guess this is a feature of flash DRM. But then, a third-party website comes in & was able to give the direct urls to same video
http://av.vimeo.com/42007/964/95995392.mp4?aksessionid=96d0b8ffbb4c0c04b1c6b7f1562de7d5&token=1343971749_85ce464ec3361604fbda75e38e29f4e8
From a programmers standpoint, i was wondering how does it work? how are these video downloaders able to fetch direct url of the videos which are not even present in html source? what is their process if anyone can explain that step-by-step.

They do server-side analysis of the flash object, which will establish a conection to download the video. That connection can easily be captured. That even works in a browser, with Firebug for example:

Related

Not Showing Embeded youtube video in email template

Is it possible to embed video into an email that will allow the viewer to watch the video within the email itself?
<iframe width="560" height="315" src="https://www.youtube.com/embed/wbY_Szw8X7Q" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
When I use above iframe code in my email template instead of the video it showing blank.
The answer, unfortunately, is that it's not possible. You need to:
Provide a link to the video source (in your case https://www.youtube.com/embed/wbY_Szw8X7Q)
Attach this file as an mp4 to the email itself.
It depends on the E-mail provider. Each provider supports different "HTML E-mails". Some support iframes, others don't. I would encourage you to Google which E-mail providers support iframes, and which don't.
Some pointers:
https://www.campaignmonitor.com/blog/email-marketing/2010/08/do-iframes-work-in-email/
https://www.simplycast.com/interactive-marketing-support/faqs/are-iframes-compatible-with-emails/
https://mailchimp.com/help/limitations-of-html-email/
https://www.experts-exchange.com/questions/21773969/IFRAME-in-a-mail-possible.html
Etc...
You must not embed a video because it is not supported by major email clients. You may however show a thumbnail image, with a link. Once they click on on the thumbnail "play button", it redirects to the link URL, and plays the video, in a browser.

What is the gesture="media" HTML attribute?

When using oembed to get embed codes for Youtube, I get this HTML:
<iframe allowfullscreen="" frameborder="0" gesture="media" height="270" src="https://www.youtube.com/embed/4B36Lr0Unp4?feature=oembed" width="480"></iframe>
Do you notice the gesture="media" HTML attribute? What is it? What does the "media" value do?
It’s a non-standard (or not-yet-standard) thing that’s so far only used for media autoplay in Chrome.
See https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#iframe:
Iframe delegation
Once an origin has received autoplay permission, it can delegate that permission to iframes via a new HTML attribute. Check out the Gesture Delegation API proposal to learn more.
<iframe src="myvideo.html" gesture="media">
Without iframe delegation, videos will not be able to autoplay with sound.
And see also https://www.chromium.org/audio-video/autoplay:
By default embedded IFrames will only be able to play muted or silent videos. However, if site owners wish for IFrames on their site to be able to play unmuted content, they may pass the autoplay permissions to the IFrame via the gesture=media attribute. This attribute allows any video contained in the IFrame to play as if it were hosted on the site.
Those things both cite https://github.com/WICG/gesture-delegation/blob/master/explainer.md, but that document’s author says the gesture name was only ever intended as a “placeholder” and that a Chrome Intent to Ship will go out soon with the real name of the HTML markup attribute being delegatestickyuseractivation. So you’ll instead need to do:
<iframe src="myvideo.html" delegatestickyuseractivation="media">
media - delegates user activation to the iframe in the context of media playback (ie. autoplay).
More here https://github.com/WICG/gesture-delegation/blob/master/explainer.md

Implementing a Video via iframe, vimeo or self hosted?

This is my first time implementing a video within a website. I have uploaded the website to vimeo and was going to use that as my host, however I DO have the video on my server also. There are a few things about the vimeo hosting that I do not like. eg. the buttons and the outro of recommendations that they include, but I absolutely love how their code positions the video on the page, full width etc.
Below is the code I took from the vimeo developers page and it works great. This may be a really stupid question but could somebody show me how to adapt the code for a self-hosted video.
<li>
<iframe src="http://player.vimeo.com/video/114867351?api=1;title=0&byline=0&portrait=0&color=d01e2f&autoplay=1" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</li>
Within your answer could you also advise as to whether you would host your own video or use a website like Vimeo to host, as I am not sure what to do for the best.
This will be removed when the question is answered but here is a livelink to page with the video included.
HTML5 can support videos directly.
<video controls autoplay style="whatever css styles you fancy go here.">
<source src="yourvideo.mp4" type="video/ogg">
Your browser does not support HTML 5.
</video>
That's pretty much it. It will not however work with older browsers.
I wouldn't do this, because it will use up your bandwidth and put unnecssary stress on your server. Otherwise, fine. E.g. if you have a high-end dedicated server and you're not expecting to get a surge of users at any one point in time, then it should be fine. Otherwise, you're better off hosting externally.
Another benefit of hosting on Vimeo is that it does all the donkey-work for you in terms of getting a responsive video container and making sure it works with the maximum number of devices possible.
There is no wrong way of doing it - It just depends on what you're trying to achieve, what your server is capable of, and what your users are like.

Embedding a Video in PowerPoint

Youtube provided the following code for a video I would like to embed in a presentation:
<iframe width="560" height="315" src="//www.youtube.com/embed/L6gtOVDG68g" frameborder="0" allowfullscreen></iframe>
However, powerpoint keeps giving me the error that it "cannot insert a video from this embed code." Is there an error in the code that youtube provided?
Usually to embed video from YouTube into a slide, it's best to download the YouTube Wizard plug in (here). After you do that there will be an "Insert YouTube video" command on your toolbar.
However, you'd probably be better off downloading the video and embedding it from inside PowerPoint and choosing Insert – > Movie – > Movie from file to put the video into the current slide. That way you don't need connection to the internet.

Embedding videos from youtube in a generic way

I am creating a web site where users submit their (raw) youtube links and the system should automatically embed them. However, I cannot embed the youtube videos unless I get the special embed link given by youtube. How can I manage to embed any youtube link provided to the system ? Any suggestions ?
Can't you just drop this in, and update video_id as need be?
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>
Cenmre, I have the perfect solution for you.
YouTube supports oEmbed, which lets you send it any URL, and get back the appropriate embed code.
Read more about the standard, and how YouTube supports it.