Is it possible to get the latest YouTube video thumbnail from my channel? I just want to show 5 latest YouTube video thumbnails on my website, then play the video in a pop up when I click on it.
Show 5 latest YouTube video thumbnail in my website
$channelid=""; //write the channel id in quotes
$xml = simplexml_load_file(sprintf('https://www.youtube.com/feeds/videos.xml?channel_id=%s', $channelid));
$id = $xml->entry[0]->children('yt', true)->videoId[0]; //First Video ID
$id2 = $xml->entry[0]->children('yt', true)->videoId[1]; //Second Video ID-Duplicate this up to 5
$thumbimg="http://img.youtube.com/vi/$id/maxresdefault.jpg"; //First Video's thumnail
$thumbimg2="http://img.youtube.com/vi/$id2/maxresdefault.jpg"; //Second Video's thumnail-Duplicate this up to 5
Related
I have 2 video players on single page. On desktop, everything works fine, both video players are playing videos. But when I try to cast this page to Chromecast (via Google Chrome extension or via https://demille.github.io/url-cast-receiver/), only first video player is active and playing, second video player is not working.
I tried to debug it and it looks like second video ends at video readyState=1 (first video has readyState=4)
Is there way to fix this? (I need multiple video players on single page, so using only one player and switching video files URLs is not a solution)
URL: http://iuvomedia.eu/chromecast/
If you want one video to play and other to be pre-loaded then you should make a queue of videos you want to play. Chromecast will play single video at a time and when it ends it'll automatically load the next one in the queue.
For information on autoplay and queuing you may visit https://developers.google.com/cast/docs/autoplay
You cannot have more than one active media element.
I mean, you can have two media elements where one plays a video that doesn't have any audio and the second one plays only audio.
You cannot have two active video or two active audio pipelines at the same time.
check here: Create multiple instances of html video object
I am using AVPlayer for playing video url coming from server in TVOS SDK . For getting meta data of video I swipe down in video player screen . In metadata screen there are two buttons Info and Audio out of them click on Info button subtitles. After that clicking on Menu button of Apple TV remote I quit the player screen but audio is still playing in the background .
You should set the appropriate AVAudioSession for your application and stop all audio in your viewWillDisappear, viewDidDisappear, or applicationDidEnterBackground.
AVAudioSession Class Reference
I need to fetch the video title as well as the video itself in the iframe/ embed object for Youku. When you embed a youtube video on a page, it has the title of the video within the embed showing, I need the same thing for Youku. I have exhausted my search for the solution online. Any ideas?
Ok, I have on my joomla site a videogallery (Name: Apptha contus hd video share). The problem of this video gallery is that is not html5. So the videos of the gallery can not be played by mobile device. So I want to add a button at the bottom (available only for mobile device ) of the player that open the JW Player that must contain the same video information (Thumb url, Video url) of the player above him.
I know how to script the button, but my problem is how to change the JW Player code to get video and thumb information from the database. Any tips?
By default mobile devices does not support flash players and supports only HTML5 player. If you have flash player in your mobile, then it is possible to play the videos. Also HTML5 players does not support except .mp4 with H264 (HD) format videos. We can play embed videos like YouTube, Vimeo etc., So to replace the video share player with JW player, you need to customize the code. You need to replace the code with JW Player embed code in default_player.php in components/com_contushdvideoshare/views/player/tmpl/ path. You can find $this->htmlVideoDetails variable in that file. this will return the current video detail from database. You can pass the required detail from this array variable to JW Player embed code. Also make sure to place the HTML5 player code. So that it will work in mobile device too.
I want to extract video duration from source of youtube video, Is that possible?
I have punch of of youtube URLs and I want to assign every URL to its duration.
I have tried from HTML source but all I get is from related video results not the main one
Here, you can get all infos about a youtube video with PHP:
http://www.techtweaker.com/how-to-get-youtube-video-info-with-php/