{"id":22484,"date":"2016-06-04T03:01:18","date_gmt":"2016-06-03T17:01:18","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=22484"},"modified":"2016-06-04T07:18:56","modified_gmt":"2016-06-03T21:18:56","slug":"youtube-api-start-and-stop-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/youtube-api-start-and-stop-primer-tutorial\/","title":{"rendered":"YouTube API Start and Stop Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_start_youtube.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"YouTube API Stop and Start Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/youtube_start_stop.jpg\" title=\"YouTube API Start and Stop Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">YouTube API Start and Stop Primer Tutorial<\/p><\/div>\n<p><a target=_blank title='YouTube' href='http:\/\/youtube.com'>YouTube<\/a> is a very well known, and the most popular video watching website on the &#8220;net&#8221;.<\/p>\n<p>It is no surprise that programmers and developers everywhere are interested in interfacing to it.  We interface to it today, just purely with client side HTML and Javascript and the wonderful <a target=_blank title='YouTube API for Iframe embedded videos' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>YouTube API for Iframe embedded videos<\/a> reference website, the information for which we got directed to via this <a target=_blank title='Useful link' href='http:\/\/stackoverflow.com\/questions\/6970013\/getting-current-youtube-video-time'>useful link<\/a> &#8230; so thanks, everybody.<\/p>\n<p>Using the YouTube API means you&#8217;ve got access to information, such as &#8230;<\/p>\n<ul>\n<li>the total length of the video clip<\/i>\n<li>the accumulated length you have watched<\/li>\n<\/ul>\n<p> &#8230; without which it is hard to do what we want to do today.  And that is simply to ask you for &#8230;<\/p>\n<ol>\n<li>YouTube video identifier<\/li>\n<li>how many seconds do you want to use to start and stop your way through the viewing &#8230; -1 here let&#8217;s you view the whole video in one session<\/li>\n<\/ol>\n<p>This exercise was helped enormously by the great example code at the <a target=_blank title='YouTube API for Iframe embedded videos' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>YouTube API for Iframe embedded videos<\/a> reference website.<\/p>\n<p>Here&#8217;s the HTML and Javascript code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_start_youtube.html_GETME\" title='stop_start_youtube.html'>stop_start_youtube.html<\/a> with its <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/stop_start_youtube.html\" title='Click picture'>live run<\/a> link, as well.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d22484' onclick='var dv=document.getElementById(\"d22484\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/api\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22484' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>YouTube is a very well known, and the most popular video watching website on the &#8220;net&#8221;. It is no surprise that programmers and developers everywhere are interested in interfacing to it. We interface to it today, just purely with client &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/youtube-api-start-and-stop-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,1,33,37],"tags":[88,212,513,576,652,997,1319,1369,1493],"class_list":["post-22484","post","type-post","status-publish","format-standard","hentry","category-elearning","category-uncategorised","category-software","category-tutorials","tag-api","tag-client","tag-google","tag-html","tag-javascript","tag-programming","tag-tutorial","tag-video","tag-youtube"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22484"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=22484"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22484\/revisions"}],"predecessor-version":[{"id":22485,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22484\/revisions\/22485"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=22484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=22484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=22484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}