I'm building a social network site with Laravel
I have a section of my site where a user can submit a URL to a video with a form ex. https://www.youtube.com/watch?v=xxxxxxxxxx
The URL gets saved in the database.
I want to embed the youtube/vimeo player on the page using an iframe.
I can grab the url using $video->url
In order to display the iframe I use
<iframe width="306" height="200" src={{ $video->url }} frameborder="0" allowfullscreen></iframe>
The space is there but no video. Just blank space. I figure this is because the link is not the embed link youtube provides which should be //www.youtube.com/embed/xxxxxxxxxx
Is there a Laravel way to convert site URLs to embed URLs? I don't want to make my users submit the embed URL since most people don't know about it and it's easier for them to just submit the URL in their browser
You can grab the id of youtube video before saving the url to the database.
Then store the embed link:
"http://www.youtube.com/embed/$youtube_id"
Related
I have a website for learning.
I want to add a video playlist from my country video site named aparat.com
you can learn how to make a video playlist with embed code from aparat?
my website uses WordPress.
I see another site a playlist from aparat embed. but I don't know how to make
Any aparat film have a special link that not change.
https://www.aparat.com/video/video/embed/videohash/{{hash}}/vt/frame
{{hash}} is latest section of your video page in aparat.com
for example
https://www.aparat.com/v/6EBX3
6EBX3
So your video link will be:
https://www.aparat.com/video/video/embed/videohash/6EBX3/vt/frame
It's your special video link
Now you must create a slider (with any plugin that supports video links) and add your video links.
I am embedding a Vimeo video, however, I wish to add their "Do not track" function.
I have added the URL parameter
?dnt=1
<iframe src="https://player.vimeo.com/video/12341234123?dnt=1"/>
however, I still see cookies from Vimeo when loading the site.
What am I doing wrong?
I tried using 2 different plugins for this purpose(ombed, this old plugin)
The problem is, that on the post page, the URL to YouTube is displayed, but inside an IMG tag, instead of an embed \ iframe .
E.G:
<img src="https://www.youtube.com/watch?v=1SO_tuALYgQ&feature=youtu.be" alt="" class="cover">
Any help is much appreciated.
To quickly embed a YouTube video, simply copy the video’s URL
from your web browser’s address bar while viewing the video.
Paste it on a line by itself in your post/page editor
WordPress will take care of the rest!
See detailed description here
How could I upload audio/video files in my wordpress post or page?
Indeed there is an icon buttons to upload both type of files but when I used the Add Video button, browse a video file & update my post, I surprised that it only showed a link of that video file and when I vied it's HTML there were no tag of ....
So how it is possible to add audio/video file in wordpress post/page form my Dashboard Panel means I don't want to copy/paste embed code from youtube or some where else in my HTML code.
Like for audio I found
[audio http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3|width=180]
similarly for video I found
<embed src="http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3" width=180></embed>
that are not the best way to add 100s of audio/video files in Wordpress post/page..!
Thanks..
In order to display a video in Wordpress you need to embed using the HTML5 "Video for everybody" method or another video player. There are plugins that help you achieve this.
How I can create a thumbnail from a URL?
For example:
Like on Digg, when I submit a link, Digg choses a Thumbnail from any images on that URL.
Or like Facebook, when I submit a link, I can chose a thumbnail for that link.
So, how I can do that with ASP.Net/C#. I just want to create a thumbnail (not a screenshot of the web page).
To create a screenshot from a web page you need to have an interface to a layout engine like Gecko or Webkit. You may use khtml2png for creating web page screenshots.
To create thumbnails from the web page you have to parse the web page's source, download the image links and resize them to the given thumbnail size.
You can try my C# wrapper for CutyCapt.