{"id":48975,"date":"2020-05-11T03:01:49","date_gmt":"2020-05-10T17:01:49","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=48975"},"modified":"2020-05-11T06:56:24","modified_gmt":"2020-05-10T20:56:24","slug":"html-canvas-video-display-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-video-display-primer-tutorial\/","title":{"rendered":"HTML Canvas Video Display Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/canvas_createpattern_video.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"HTML Canvas Video Display Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/canvas_createpattern_video_zoom_bigger_screenresize.gif\" title=\"HTML Canvas Video Display Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">HTML Canvas Video Display Primer Tutorial<\/p><\/div>\n<p>In doing the research for yesterday&#8217;s <a target=_blank title='HTML Canvas Pros and Cons Inline HTML Email Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-pros-and-cons-inline-html-email-tutorial'>HTML Canvas Pros and Cons Inline HTML Email Tutorial<\/a>&#8216;s heavy use of the stupendous HTML(5) <a target=_blank title='HTML Canvas element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'>canvas<\/a> element we came upon a very interesting discovery, at least for us, that being the <a target=_blank title='HTML canvas createPattern() Method information from W3schools' href='https:\/\/www.w3schools.com\/tags\/canvas_createpattern.asp'>HTML canvas createPattern() Method<\/a>.  Have you read this webpage yet?  <font color=blue>Did you notice &#8230;<\/font><\/p>\n<blockquote cite='http:\/\/www.w3schools.com\/tags\/ref_canvas.asp'><p>\nDefinition and Usage<br \/>\nThe createPattern() method repeats the specified element in the specified direction.<br \/>\n<br \/>\nThe element can be an image, <font color=blue>video<\/font>, or another &lt;canvas&gt; element.<br \/>\n<br \/>\nThe repeated element can be used to draw\/fill rectangles, circles, lines etc.\n<\/p><\/blockquote>\n<p>?  So modestly put, in a list like that, but the implications so big, would you not say <font size=1>&#8230; eh wot, guv&#8217;?!<\/font><\/p>\n<p>No examples followed, alas, but a scouring of the &#8220;net&#8221; arrived at <a target=_blank title='The Definitive Guide to HTML5 Video' href='https:\/\/books.google.com.au\/books?id=IxhnNqaaW_IC&#038;pg=PA183&#038;dq=canvas+createPattern+video+example&#038;hl=en&#038;sa=X&#038;ved=0ahUKEwjIkvP5hKjpAhUXzjgGHWmgA7cQ6AEIKDAA#v=onepage&#038;q=canvas%20createPattern%20video%20example&#038;f=false'>The Definitive Guide to HTML5 Video<\/a> (ISBN: 978-1-4302-3091-5) mention on a <a target=_blank title='Google' href='https:\/\/google.com'>Google<\/a> search, thanks everyone!<\/h4>\n<p>This gave us great scope for a proof of concept web application we got going so long as we clicked (and so the <a target=_blank href='https:\/\/www.w3schools.com\/html\/html5_video.asp' title='HTML video element information from w3schools'>video<\/a> becomes visible) on the controls of a video element (to play it), as is now the go with a lot of platforms, when it comes to working with (and amongst) media forms.  A video plays, and the canvas createPattern helps project &#8220;repeat&#8221; or &#8220;no-repeat&#8221; (controllable to user, a concept similar to how background images can work) onto the right hand table cell&#8217;s canvas via a hidden smaller canvas conduit, the widths and heights controllable to the user as well (all the way to, perhaps, having the canvas be bigger than the video, and so zoom into it (and maybe zoom out the screen) as you can see with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/canvas_createpattern_video_zoom_bigger_screenresize.gif\" title='Tutorial picture'>animated GIF tutorial picture<\/a>).  In that tutorial picture, also take a quick skeg at macOS two finger gesture&#8217;s video &#8220;Picture in Picture&#8221; functionality, too.<\/p>\n<p>Pretty interesting start to a journey we think there&#8217;ll be more to talk about into the future.  You can try for yourself at the &#8220;proof of concept&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/canvas_createpattern_video.html-GETME\" title=\"canvas_createpattern_video.html\">canvas_createpattern_video.html<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/canvas_createpattern_video.html\" title=\"Click picture\">live run<\/a> link.<\/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='#d48975' onclick='var dv=document.getElementById(\"d48975\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/canvas\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d48975' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In doing the research for yesterday&#8217;s HTML Canvas Pros and Cons Inline HTML Email Tutorial&#8216;s heavy use of the stupendous HTML(5) canvas element we came upon a very interesting discovery, at least for us, that being the HTML canvas createPattern() &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/html-canvas-video-display-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,14,37],"tags":[184,1580,3297,652,760,2362,997,1238,1319,1369],"class_list":["post-48975","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-canvas","tag-cell","tag-createpattern","tag-javascript","tag-media","tag-play","tag-programming","tag-table","tag-tutorial","tag-video"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/48975"}],"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=48975"}],"version-history":[{"count":10,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/48975\/revisions"}],"predecessor-version":[{"id":48985,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/48975\/revisions\/48985"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=48975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=48975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=48975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}