Embedding YouTube thumbnails - html

I have a question about embedding YouTube videos on a new website I'm working on.
It is a collection of livesets from different festivals around the world. Each embedded video has its own page, but on the overview pages I use the thumbnails mqdefault.jpg/hqdefault.jpg,etc of the different videos. If you click on them you navigate to the page where the video is embedded. Is embedding the thumbnails this way allowed (directly linking to YouTube)? Embedding the video is ok if embedding is enabled, but I can't find anything about the thumbnails. I can retrieve the url with the YouTube API (or just guess it) so I presume it is not a problem.

You are dependent on static url scraping are not supported. They can get changed and you may need to change your application at everytime.
For this you should use Data API v3. You should go with a videos->list request with id=videoId and part=snippet. In the response you will check snippet.thumbnails.['high'].url
Upload Thumbnail example also lists the thumbnails. However, I use static url from google. I use
https://ytimg.googleusercontent.com/vi/<insert-youtube-video-id-here>/default.jpg
It work as same as othet static url. But if you don't want to change url of thumbnail every time static url change you can go with that. I use youtube for example very limited time and only for teaching how its work. But for your site you should use api. Hope it helps you.

Related

Can I embed an A-Frame scene into Squarespace?

I want to embed this a-frame project to my portfolio on Squarespace (most basic plan) like what a-frame shows in their embedded page but I'm not even sure if it's possible? I'm also super new to coding so let me know if I should provide more info. If people can also explain things in baby language that would be awesome thanks
embedding remote a-scene?
if you want to link your existing project to a different page then... I don't think it's possible. Look:
the documentation page uses a real a-scene there, with a-boxes and stuff.
It may be possible via iframes but I don't know if it works. There is something like this in the documentation:
For now, if the I-Frame is not on the same origin as the page, the WebVR polyfill for mobile won’t work and there won’t be any tracked rotation of the device. - source
embedded
embedded is used to create a smaller window of a-scene inside a standard HTML page. As far as I know, it just sets or changes some CSS values. Unfortunately, there is nothing like a magical src attribute that would allow you to fetch a different scene from another page
If you can upload a static HTML file onto Squarespace then by all means you can embed it there. But remember that
Only one <a-scene> can exist on a page - same source
You would need to copy your entire project a-scene and paste it into your Squarespace page. Add A-Frame script in header or link a js file and all standard stuff.
link
this may not be what you are looking for but you could potentially create an embeded a-frame scene that would have a link inisde that would "teleport" you (change location) to your project. link - A-Frame

how to add video properties while downloading

i visited g2g.fm, a site for downloading movies. They claim that they do not store those movies on their servers. But when you download a movie (mp4) it already comes with properties added. And the comment property as there url address.
What i want to know is. Is their a code you place on html, that adds properties while the user is downloading the video link taken from another site like g2g.fm ?
Im building a blog of my own. And i index links from other sites. Problem is, those files from other sites come with properties added and there url .

How to handle URL changes and keep SoundManager2 playing on background?

I am developing a web application, where a mp3 player is present and user can play the music. Issue that i am facing is how to keep the music playing (and the player untouched) even when I change the URL - go to a different page? The same thing as Deezer or SoundCloud do. You can browse the web and listen to the music meanwhile. Please point me a direction how to implement it. Thank you all!
On soundcloud they don't actually change the page they just change some of the body content with javascript. You can simply do the same, by adding a hidden div for the music, and a div for the content, which calls an api (recommend jquery.ajax) to fetch the content relative to the url in the address bar.
With rewriterules inside the .htaccess file, you can make it so it ignores all query strings etc. So it will always load the index.php file.
In short, this is no rocket science, has nothing to do with html5 nor soundmanager2. For more info you should use the .htaccess and jquery tag.

Creating client video review pages in WordPress

We are looking for an easy way to share our work in progress videos with our clients - for feedback.
We are using WordPress.
We want to avoid email/ftp/youtube/vimeo etc... And simply have our clients access a link to our site that we give them.
Is there a way that I can get the following:
create a directory "client_0001" on our webserver
upload our client's videos to the directory
send the link to the server "http://mysite.com/client_0001" to our client
when the clients accesses the link they will be presented with our wordpress site, but not some post/page but rather a template of the site with html5video/mp4 players in the page for each video that we uploaded?
There's no real reason to do this using Wordpress. In fact, it would certainly be more work doing it in Wordpress. A decent way to do this would perhaps create a php page with your template/html5 player, and having this page parse a GET variable to display the video. That way you can send your clients links like http://mysite.com/video_preview.php?videofile=somevideofile.mp4
For example:
Directory Structure:
example.com/
previews/
video_preview.php
someVideo.mp4
Then in video_preview.php, you can parse a GET variable and display any page you want. Here's a rough example.
<?php $video = $_GET['videofile'] ?>
<html>
// The HTML you want to use for the template. All CSS/JS, etc, etc...make it look pretty. (or dow't)
// Then you'd call your video player, however you want to do that. Basically, you just dynamically choose the video file based on the URL your client clicks.
<player src=<?php echo $video ?>
</html>
I wish I had WordPress ten years ago when I was hand crafting all those client pages in Dreamweaver...
The only caveat right now is the file size that can be uploaded directly in WP. But this can be solved uploading via FTP to a custom folder and doing a video player Shortcode to render player+posterframe:
[vplay file="http://example.com/custom/video.mp4" poster="http://example.com/wp-content/uploads/picture.jpg"]
A custom page template, for example, with customized header and footer, that after page creation would have a URL like: http://example.com/clients/project-name/.
Password protected for the client's convenience, or some membership in the site for restricted content. Comments form enabled for internal communication. Image gallery if necessary. Among other goodies.
What's good about YouTube and Vimeo are the privacy options and doing the web-format rendering for you. In this WordPress Answers, Video tutorials in dashboard, I write about the options.

HTML object tag to embed a web page

We have a feature in our application which allows users to select a set of assets (images, videos etc.) and generate an embed code for those, which can be embedded in another web page. As of now we use iframes to implement in the embed code where page pointed by src attribute of iframe spits out HTML to embed.
For some security reasons we want to get rid of iframes and replace that with something else like an object tag, script tag etc.
My question is about object tag. Primary use of object tag seems to be to embed a video, a pdf etc. I know it can be used to embed an entire webpage just like what we want. But my question is - is that recommended? The webpage we want to embed will have a set of assets with options to sort, download, share, preview those assets.
So will it be a good practice to use object tag for embedding such a complex web page? Or is it meant for minimal usage like embedding a video clip, a slideshow etc.?
Depending on the type of technology you are using, you can do something similar.
With your request you are getting into the portlet/web part discussion, where you want to embed portlets (mini apps). There is no object tag you can use (to my knowledge its only image, applet and iframe I think) from the client side, but you might be able to pre-load the parts before you send the user the final page (say, like wordpress widgets in php).
Otherwise you need to go the Javascript route, and do some kind of lazy loading of your 'widget/applications' as needed.