Tagged Questions
42
votes
1answer
13k views
Building a Chrome Extension - Inject code in a page using a Content script
I'm learning how to create chrome extensions and I just started developing one to catch youtube events. I want to use it with youtube flash player (later i will try to make it compatible with html5).
...
41
votes
1answer
23k views
YouTube iframe API: how do I control a iframe player that's already in the HTML?
I want to be able to control iframe based YouTube players. This players will be already in the HTML, but I want to control them via the JavaScript API.
I've been reading the documentation for the ...
23
votes
5answers
15k views
How to get number of video views with YouTube API?
The question is very simple. How to get number of video views with YouTube API?
The task is simple but I would like to use that query on large number of videos very often. Is there any way to call ...
15
votes
2answers
24k views
How can I stop a video with Javascript in Youtube?
Situation:
here, where I pressed some video.
Problem: I try to stop the video by Javascript in the console of Firebug:
player.stopVideo(playerid):Void [1] [2]
Question: Why does not the command ...
14
votes
1answer
7k views
Hyperlink to play youtube video
Is it possible to create a hyperlink on your web page that can play an embedded youtube video on the same page.?
12
votes
3answers
9k views
How to pause a YouTube player when hiding the iframe?
I have a hidden div containing a YouTube video in an <iframe>. When the user clicks on a link, this div becomes visible, the user should then be able to play the video.
When the user closes the ...
11
votes
6answers
10k views
YouTube API — not firing 'onYouTubePlayerReady()'
From what I've read, this is how I should setup the YouTube API:
<!DOCTYPE html>
<html lang="en">
<head>
<meta content='text/html;charset=UTF-8' http-equiv='content-type' ...
10
votes
1answer
2k views
YouTube (injected) video ends callback
I inject YouTube iframe to a div in document ready and bind it to click:
jQuery(document).ready(function($) {
jQuery('.video-thumb').click(function(){
...
...
7
votes
1answer
8k views
Hide/show in JavaScript - stop playing YouTube iframe video [closed]
I've used the iframe function to embed videos, and I'm hiding/showing the content and videos through JavaScript.
I have one problem. When I press play on the first video, and then click on the next ...
7
votes
1answer
229 views
YouTube API 'orderby=duration' not handling the entire playlist, just the newest videos
I'm trying to build a little JavaScript program to query the YouTube API for a given playlist, ordered by duration. Everything works otherwise perfectly, but the ordering does not account for the ...
7
votes
2answers
8k views
YouTube Player API: How to get duration of a loaded/cued video without playing it?
I'm not able to get the correct video duration/length (in seconds) of a loaded/cued video via the getDuration() method of the YouTube Player API; the same method, however, returns a valid value once ...
6
votes
4answers
209 views
Check to see if youtube video is static image
How can it be determined if a youtube video is an actual video or just a static image?
Since it's likely not possible using the youtube API, is there a workaround using javascript/jquery to scan ...
6
votes
3answers
4k views
YouTube API not working with iPad / iPhone / non-Flash device
This piece of code works great in DESKTOP browsers (code courtesy of @Rob-W), click the thumbnail and the adjacent video will start playing, using YouTube's API.
http://jsfiddle.net/KtbYR/5/
The ...
6
votes
1answer
2k views
Jquery TubePlayer Plugin not functioning as desired
TubePlayer is a jQuery Plugin that implements YouTube Player API, and allows us to create our own controls and components for YouTube videos.
The TubePlayer Website provides tips on getting started ...
5
votes
1answer
779 views
Removing black borders 4:3 on youtube thumbnails
E.g. I have a link
http://img.youtube.com/vi/aOPGepdbfpo/0.jpg
for a youtube video thumbnail:
And I would like to remove the black top and bottom border so I get a picture like this:
Could it ...