youtube

Getting a lot of crashes from android youtube player api

可紊 提交于 2019-12-22 10:36:42
问题 I am using version 1.2.1 (tried with latest version 1.2.2) of android's youtube player api . It works fine on most of the devices. However now and then, I keep on getting crashes on crashlytics. I am getting the following crashes Fatal Exception: java.lang.IllegalStateException: android.os.TransactionTooLargeException at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.x(SourceFile:558) at bpd.w(SourceFile:576) at tef.onTransact(SourceFile:390) at android.os.Binder.transact

Removing black bars off video thumbnail

假如想象 提交于 2019-12-22 10:26:27
问题 I have gallery where user can submit Youtube links to videos and server fetches the thumbnail from Youtube automatically. However, lots of videos contain black bars on top and bottom of the image. I know the origin of the black bars, but as i resize thumbnail to square, the black bars interfere with the design. I have tried to analyze pixel color from top to bottom until no black color is found ( imagecolorat() ), but it still leaves some near-black color so the small bars still reside in the

Avoid scroll-wheel hijack by embedded youtube / flash video

淺唱寂寞╮ 提交于 2019-12-22 10:25:41
问题 I am making some improvements on a web-site that has a youtube video embedded in its home-page. I have not added this code myself, but it looks like: <object width="380" height="307"> <param name="movie" value="http://www.youtube.com/v/DooLJvsH_BY&hl=en_US&fs=1&" /> </param> <param name="allowFullScreen" value="true" /> </param> <param name="allowscriptaccess" value="always" /> </param> <embed src="http://www.youtube.com/v/DooLJvsH_BY&hl=en_US&fs=1&" type="application/x-shockwave-flash"

Is there a way to get a high-res YouTube video thumbnail without letter-boxing?

穿精又带淫゛_ 提交于 2019-12-22 09:56:03
问题 I don't understand at all why the YouTube API's thumbnails seem to include letter boxing for videos. If I want the thumbnail for this video, and use the methods shown here I can get the mqdefault version that is a little too small (but thankfully doesn't have letterboxing), but if I jump up to say the sddefault , which is a good size, I get: (http://img.youtube.com/vi/12fR9neVnS8/sddefault.jpg) I really just want it without the letter-boxing. Do I have to crop it out myself programmatically?

Getting a Youtube video title using AngularJS

限于喜欢 提交于 2019-12-22 09:28:34
问题 I'm having trouble with getting a youtube video title using AngularJS Here's the code I have so far: services.js var myServices = angular.module('myServices', ['ngResource']); myServices.factory('ytapi', ['$resource', function($resource) { return $resource('http://gdata.youtube.com/feeds/api/videos/gzDS-Kfd5XQ?alt=json-in-script&callback=JSON_CALLBACK&prettyprint=true&fields=title', {}, { jsonp_query: { method: 'JSONP' } }); } ]); controllers.js var myApp = angular.module('myApp', [

YouTube iframe embedded in SVG moves to front whilst playing in Chrome

旧街凉风 提交于 2019-12-22 09:27:11
问题 The Problem I am trying to embed a YouTube video inside an SVG. It works as expected on Chromium (Ubuntu), but on Google Chrome (Windows 7) the video moves itself to the front of the canvas whilst playing, then back to its original position when playback has stopped. Does anyone know why the video seems to change it's z-index, and how it can be stopped? There is another secondary issue (slightly less pressing in my case) where Firefox displays no video, only audio when playing the video. The

How to fullscreen youtube video in WebView

坚强是说给别人听的谎言 提交于 2019-12-22 09:05:40
问题 I use following code: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test_web_view_play_youtube); WebView w = (WebView) findViewById(R.id.w); w.setWebChromeClient(new WebChromeClient()); w.setWebViewClient(new WebViewClient()); w.getSettings().setJavaScriptEnabled(true); w.loadUrl("https://www.youtube.com/watch?v=gY-HZg1Uwpc"); } i get following screenshot In this screenshot, I could not see "fullScreen"

youtube - cannot swipe past iframe in carousel / slider

末鹿安然 提交于 2019-12-22 06:57:13
问题 I have a responsive site with a carousel. The user can embed a youtube video as one of the slides. On desktop this works fine. On mobile however the iframe apparently eats all the swipe events and you cannot swipe past the video. We had to hack around this by substituting an image of the video and then using window.open() open a new window with the video. It sucks. Is there a good way to overcome this? 回答1: In short, I discovered I was doing it wrong. The slider script works very well on both

Youtube API to get most viewed video for a day

こ雲淡風輕ζ 提交于 2019-12-22 06:49:37
问题 Is there a way to get the most viewed video on youtube for a particular day? Is there any API available for it? Is there some source which gives you the video ? 回答1: Yeah they don't have stats on a particular day but they do have a running viewCount. So you can use the API info at https://developers.google.com/youtube/v3/docs/search/list to make something like https://www.googleapis.com/youtube/v3/search?part=snippet&order=viewCount&publishedAfter=2014-10-29T00%3A00%3A00Z&publishedBefore=2014

Youtube Iframe API not working for mobile devices?

﹥>﹥吖頭↗ 提交于 2019-12-22 06:29:08
问题 I am confused. The Youtube Iframe API with the standard example: https://developers.google.com/youtube/iframe_api_reference?hl=de always used to work for my mobile devices and does not work anymore now.. I´ve tried this fiddle: http://jsfiddle.net/77PJB/3/ <div id="player"></div> var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag)