For YouTube video, how to automatically display interactive transcript? - youtube

YouTube supports interactive-transcripts, using both machine-generated and user-uploaded transcripts. This is very useful for hearings, lectures, speeches, and educational videos where a visitor might want to read along or jump around. For example in this video:
https://www.youtube.com/watch?v=IY3U2GXhz44
The visitor can click on "...More" and then "Transcript" to view the interactive-transcript.
How does a video owner make that hidden feature automatically open for visitors? I cannot find any documented method for doing that through the API for either embed or linked videos. Is there an undocumented method in the API, or a URL parameter like "&action-panel-transcript=true" that works the way I'd expect it to?

As for url parameter, you can try adding &cc_load_policy=1 behind the rel=0 if it's an embedded video or &yt:cc=on at the end of the url if it's a link to the video.
Source: https://www.makeuseof.com/tag/force-subtitles-embedded-youtube-video/

Related

Start YouTube embed playlist at a specific video/index

My app generates the first YouTube url below and embed it. I would like to start the playlist at a specific video. It is possible to do so on non-embed link with the parameter index (see 2nd link below) but this parameter does not work for my embed link.
https://www.youtube.com/embed/uNDfgnWN2G0?rel=0&enablejsapi=1&playlist=IJrwmIQqj5s,uNDfgnWN2G0,pDf46hYF4CE
https://www.youtube.com/watch_videos?video_ids=uNDfgnWN2G0,IJrwmIQqj5s,uNDfgnWN2G0,pDf46hYF4CE&index=2
Is there an alternative url parameter I could use?
I tried the parameter start as well but it doesn't work with my playlist link if I want to go beyond the second video.
https://developers.google.com/youtube/player_parameters

YouTube API Search by Tags

I'm trying to add videos to an existing ASP.NET MVC site, and I'd like to show videos from our YouTube channel.
I have added a tag to each video to indicate what page it should appear on. I had thought that I could search our channel by tag on each page to render the relevant video on that page.
I'm trying to exclusively use the API v3, but it seems I can't do this.
I can't use developer tags, because videos are uploaded by multiple users using the standard YouTube front end. This seems like basic functionality, so I'm assuming it's my inexperience with this API.
As an example, our YouTube channel is ChillinWithCharlie. During development, one video is tagged 20141213Cheneys.
I can get all videos in our channel, but is there a way to query the v3 API to retrieve just this video?
I've seen one suggestion here that I retrieve all videos, and filter in code. This feels inefficient, so I'd rather not do this, but I can't even see where the tag is returned with all channel videos, that I could interrogate in code.
It's not just you. There seems to be no specific query parameter to search by tag with API v3.
I would recommend doing a search with your tag in the 'q' (search) parameter, then checking the results to see if the tag exists in the returned snippet->tags property to verify the exact video.
Note YouTube tags are only visible to the video's uploader.
https://developers.google.com/youtube/v3/docs/videos#snippet.tags[]

Rails 3 different types of embeds under one controller

I have a rails app that I am looking into implementing videos. I know how embed the videos etc but I am confuse on how to do something like this.
I would like a user to have videos. When a users goes to add a video I want to give them the option of embedding a youtube video or a vimeo video(Should I write out if statement?) without having 2 completely different urls.
For example
If user embeded a youtube video url would look like this
mysite.com/videos/1/youtube/1
If a user were to add video it would look like this
mysite.com/videos/1/youtube/new
What I would like to implement is the user would go to video and then have the choice of choosing vimeo or youtube. Ater the user has input the url of the video and click create i would like urls to look like(whether its youtube, vimeo or uploaded from cpu)
mysite.com/videos/1
mysite.com/videos/new
What is the best way to approach this? Would it be nested resources then rewrite the url paths?
There are many solutions to this problem and I ended up using gem called oembed to handle processing of embedded files from youtube, vimeo etc.
figured this out forgot to update question. Check out solution here
Vaildate 1 field with mutiple options
From a RESTful perspective, the resource that you are requesting is the video. The mechanism of how that video is requested (whether that is Vimeo or Youtube) is irrelevant from the perspective of identifying the resource. The format of the video being requested is simply a parameter of the request. In your controller, you can decide how to render the video based on the parameters (or potentially other aspects of the request header). Your video should clearly exist as a resource as
mysite.com/videos/1
Let the parameters or the HTTP request dictate how that is rendered.

Customize YouTube Embed URL

Is it possible to modify the URL used to embed YouTube videos in an iframe (http://www.youtube.com/embed/_AJS0lgT-4a)? For example, adding the channel name.
My organization blocks YouTube so I need to create a rule on our proxy server to allow users to access our channel only.
Thank you.
Yes, if you load the videos directly from the user's channel, it'll look like this:
http://www.youtube.com/user/vsauce#p/u/4/CSf8i8bHIns
So you'd be on the user's channel homepage.
"/user/username" is your golden ticket, and #videoid will point to the video if you want to link directly to it.
Multiple other varibles are passed in the url that you can make exceptions for, most notably a playlist. This string will appear somewhere in the url, generally tacked onto the end:
"&list=PLAYLISTIDHERE" ex. "&list=PLE126C843377DCE64"
One of those should do the trick as long as the admins are willing to play nice!
Best of luck!

How to add YouTube videos to watching queue?

I have a list of youtube video links on a page. I want to let user mark interesting ones, programatically add them to a watching queue, and then forward a user to YouTube where they can watch all those videos in sequence. Is it possible?
I dont think youtube has a feature to access yt quicklist etc, but you can easily do it with youtube javascript api, if is it ok that the videos gonna be played inside your site.
http://code.google.com/apis/youtube/js_api_reference.html
Embed a youtube player with js api in your site, then you can make a simple js array for queue.
If this solution is ok for you, i gonna write some more details about it, if you're interested in.

Resources