How to get RTSP Links Android

I got my answer ..thanx to this Element rsp = (Element)entry.getElementsByTagName(“media:content”).item(1); String anotherurl=rsp.getAttribute(“url”); In gdata api only we are getting this type of links : rtsp://v3.cache7.c.youtube.com/CiILENy73wIaGQlOCTh0GvUeYRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp These are playing in VideoView.

Struggling with Youtube Player Support Fragment

I ran into this problem before and I believe the issue stemmed from trying to inflate the YouTubePlayerSupportFragment layout. I solved my issue by creating a fragment like this: public class PlayerYouTubeFrag extends YouTubePlayerSupportFragment { private String currentVideoID = “video_id”; private YouTubePlayer activePlayer; public static PlayerYouTubeFrag newInstance(String url) { PlayerYouTubeFrag playerYouTubeFrag = new PlayerYouTubeFrag(); Bundle … Read more

Pause youtube video, youtube api

Use player.playVideo(); (resume) and player.pauseVideo(); (pause) once the player is ready: http://jsfiddle.net/4WPmY/6/ function onYouTubePlayerAPIReady() {     player = new YT.Player(‘player’, {         height: ‘315’,         width: ‘560’,         videoId: ‘bpOR_HuHRNs’,     });     document.getElementById(‘resume’).onclick = function() {         player.playVideo();     };     document.getElementById(‘pause’).onclick = function() {   … Read more

YouTube Player API: How to get duration of a loaded/cued video without playing it?

Solution 1 You can use YouTube Data API to access most of the information about the video, including duration: <script type=”text/javascript”> function youtubeFeedCallback(json){ document.write(json[“data”][“duration”] + ” second(s)”); } </script> <script type=”text/javascript” src=”http://gdata.youtube.com/feeds/api/videos/4TSJhIZmL0A?v=2&alt=jsonc&callback=youtubeFeedCallback&prettyprint=true”></script> Demo here When using jQuery you can use $.getJSON() to make things easier. Solution 2 Seems like YouTube JavaScript API v3 allows you … Read more

Making youtube.com/embed URLs work on iOS

Try this, it just works: <object> <param name=”movie” value=”http://www.youtube.com/v/[VIDEO_ID]”></param> <embed src=”http://www.youtube.com/v/[VIDEO_ID]” type=”application/x-shockwave-flash”></embed> </object> Edit: It works because Apple replaces the html tag with an embedded native movie player that can play the youtube video.

loading multiple video players with youtube api

Since onYouTubeIframeAPIReady function is supposed to called only once the following approach could be used: initialize and save video player information (ControlId,width,height,VideoId) in array call onYouTubeIframeAPIReady function to create all the video players Example var playerInfoList = [{id:’player’,height:’390′,width:’640′,videoId:’M7lc1UVf-VE’},{id:’player1′,height:’390′,width:’640′,videoId:’M7lc1UVf-VE’}]; function onYouTubeIframeAPIReady() { if(typeof playerInfoList === ‘undefined’) return; for(var i = 0; i < playerInfoList.length;i++) { var … Read more

Embed Youtube code is not working in HTML

I had the same issue recently and it had nothing to do with video owners embedding settings. Apparently YouTube forbids embedding some videos in a localhost environment without a public domain, but your video can be embedded with no issue whatsoever through a public domain/subdomain: Replace the src value in the JSFiddle from @PStarczewski’s answer … Read more

Open YouTube video in Fancybox jQuery

THIS IS BROKEN, SEE EDIT <script type=”text/javascript”> $(“a.more”).fancybox({ ‘titleShow’ : false, ‘transitionIn’ : ‘elastic’, ‘transitionOut’ : ‘elastic’, ‘href’ : this.href.replace(new RegExp(“watch\\?v=”, “i”), ‘v/’), ‘type’ : ‘swf’, ‘swf’ : {‘wmode’:’transparent’,’allowfullscreen’:’true’} }); </script> This way if the user javascript is enabled it opens a fancybox with the youtube embed video, if javascript is disabled it opens the … Read more