youtube-iframe-api

Detect youtube video events with Chrome extension content script

只谈情不闲聊 提交于 2019-12-06 02:12:01
问题 I'm writing a Chrome extension and I want to detect when a video starts/ends while a user is on youtube.com watching videos. The difference between my situation and other tutorials I've read is I'm not embedding my own youtube video on my own site, I just want to detect events off of the video the user is watching on youtube. Right now my manifest.json file has the following lines for content scripts: "content_scripts": [ { "matches": ["http://*/*","https://*/*"], "js": ["js/jquery.js", "js

Chrome update block flash autoplay - how avoid it?

流过昼夜 提交于 2019-12-05 22:10:19
问题 I embedded a youtube video in a html page. I use the youtube iframe API with Flash (in my case, I cannot use an HTML5 video). Since the last Google Chrome update, Chrome block the autoplay and avoid to play/pause programmatically a video ( element.playVideo() not respond). (Everything is ok on others browsers) The only way I found is to: Go into Chrome preferences Then hit Show advanced settings... Then hit Content Settings then under Plugins , select the 1st choice Run all plugin content (or

Youtube IFrame API without cookies

故事扮演 提交于 2019-12-05 20:51:56
My country is starting to apply laws about privacy and cookies. Is there a way to use the Youtube IFrame API without storing cookies? This is a free script preventing iFrame cookies: cookies-enabler Here you get a list of free cookie law tools with features, pros and cons: free cookie law tools 来源: https://stackoverflow.com/questions/30607889/youtube-iframe-api-without-cookies

Embed Youtube with Captions on by default not working

老子叫甜甜 提交于 2019-12-05 17:36:48
I'm trying to embed a Youtube movie, and would like Captions to be on by default. From https://developers.google.com/youtube/player_parameters#cc_load_policy I understand I should use cc_load_policy=1 . I use the code html code below but it doesn't seem to work. That is, it loads with the captions off (you can manually turn captions on, so the video does have captions). What am I doing wrong? I've tried the following two options: <iframe src="https://www.youtube-nocookie.com/embed/xxxxxx?rel=0&&showinfo=0&cc_load_policy=1" frameborder="0" allowfullscreen></iframe> <iframe src="https://www

Embedding most recent YouTube video with Channel ID

拈花ヽ惹草 提交于 2019-12-04 20:40:05
I am building a website for a friend and I'm having some trouble with the YouTube player API. This is the embed HTML IFrame I have so far: <body> <iframe style="max-width: 480px" width="100%" height="360" src="http://www.youtube.com/embed?max-results=1&controls=0&showinfo=0&rel=0&listType=user_uploads&list=UCvDJ_vg2dics1kmwUPnTo_A" frameborder="0" allowfullscreen></iframe> </body> This does not work due to the fact that his YouTube channel uses the new ID system and it doesn't detect that in the "user_uploads" type. Any ideas? KENdi It is stated in the Player Parameter of Iframe API that the

YouTube IFrame API generates mixed content warning with HTTPS + HTML5

做~自己de王妃 提交于 2019-12-04 16:49:03
问题 When I embed youtube on an HTTPS page using the iframe api in HTML5 mode , it still pulls the actual stream using HTTP, which generates a mixed content warning. Is this usecase properly supported? I found this discussion from 2011 which suggests it wasn't. However I just tried accessing the CDN server using HTTPS and it works - kind of - but it returns the wrong certificate (google.com instead of something for youtube.com). Has anyone managed to embed a video on a HTTPS page using the IFRAME

YouTube iFrame API hangs in buffering state after the playVideo() command on iPad

本小妞迷上赌 提交于 2019-12-04 09:22:01
问题 I have a problem with the iFrame API on the iPad (iOS 7, Safari browser). When I try to start the video with the 'player.playVideo()' command, the player goes to black and returns a '3'-state when I call 'player.getPlayerState()' command (says it's buffering). Hitting the big red YouTube button works, but using the 'playVideo()' command does not. This can be reproduced on Google's own YouTube API demo page: https://developers.google.com/youtube/youtube_player_demo Make sure you display an

Detect youtube video events with Chrome extension content script

人走茶凉 提交于 2019-12-04 07:35:38
I'm writing a Chrome extension and I want to detect when a video starts/ends while a user is on youtube.com watching videos. The difference between my situation and other tutorials I've read is I'm not embedding my own youtube video on my own site, I just want to detect events off of the video the user is watching on youtube. Right now my manifest.json file has the following lines for content scripts: "content_scripts": [ { "matches": ["http://*/*","https://*/*"], "js": ["js/jquery.js", "js/iframe_api.js", "js/contentScript.js"], "all_frames": true } ], I have jquery downloaded and iframe_api

Youtube Closed Caption for HTML5 Not Working

拟墨画扇 提交于 2019-12-04 05:57:00
问题 I am having issues displaying closed caption on youtube videos using the iframe player. Here's the code I am using: <!DOCTYPE html> <html> <body> <!-- 1. The <iframe> (and video player) will replace this <div> tag. --> <div id="player"></div> <script> // 2. This code loads the IFrame Player API code asynchronously. var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag

YouTube IFrame API generates mixed content warning with HTTPS + HTML5

↘锁芯ラ 提交于 2019-12-03 10:45:09
When I embed youtube on an HTTPS page using the iframe api in HTML5 mode , it still pulls the actual stream using HTTP, which generates a mixed content warning. Is this usecase properly supported? I found this discussion from 2011 which suggests it wasn't. However I just tried accessing the CDN server using HTTPS and it works - kind of - but it returns the wrong certificate (google.com instead of something for youtube.com). Has anyone managed to embed a video on a HTTPS page using the IFRAME API in HTML5 without triggering a mixed content warning (ie. the lock with the yellow warning sign in