21,65d20 < var isvideoone=false, idtoclick=''; < < var xtypes = ['image/tif', 'audio/x-m4r','audio/wav','audio/x-wav','audio/x-pn-realaudio','audio/x-mpegurl','audio/x-aiff','audio/mpeg','audio/mid', < 'audio/basic','audio/ogg','video/x-sgi-movie','video/x-msvideo','video/quicktime','audio/mp3','video/mp4','video/mpeg', < 'video/x-la-asf','video/ogg','video/webm','audio/mp4', 'image/jpeg', 'image/jpeg', 'image/png', 'image/gif', 'image/bmp', < 'text/html', 'text/html', 'text/html', 'text/javascript', 'text/css', 'text/plain', 'text/xml', 'text/csv', < 'application/vnd.ms-word', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/x-php', 'application/pdf', 'IMAGE/pdf', < 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.ms-powerpoint', < 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'video/mp4']; < var xexts = ['.tif','.m4r','.wav','.wav','.ram','.m3u','.aiff','.mp3','.rmi', < '.snd','.ogg','.movie','.avi','.mov','.mp3','.m4v','.mpeg', < '.lsx','.ogv','.webm','.m4a', '.jpg', '.jpeg', '.png', '.gif', '.bmp', < '.htm', '.html', '.htmls', '.js', '.css', '.txt', '.xml', '.csv', < '.doc', '.docx', '.php', '.pdf', '.pdf', < '.pptx', '.ppt', < '.xls', '.xlsx', '.mp4']; < < function stffsub() { < if (isvideoone) { < setTimeout(stffsub,100); < if (idtoclick != '') { < document.getElementById(idtoclick).click(); < } else { < document.getElementById('fauxform').submit(); < } < } < } < < function ffform() { < if (isvideoone) { < idtoclick='fsub'; < setTimeout(stffsub,500); < } else { < idtoclick=''; < } < } < < function fform() { < if (isvideoone) { < idtoclick='fsub'; < setTimeout(stffsub,500); < } else { < idtoclick=''; < } < } 141c96 < document.getElementById('an' + iurlit('img')).src=oinp.value; --- > document.getElementById('animg').src=oinp.value; 235,238c190 < if (document.getElementById('iurl').value.indexOf('data:video') != -1) { < document.getElementById('ansource').type='video/' + document.getElementById('iurl').value.split('data:video/')[1].split(',')[0].split(';')[0]; < } < document.getElementById('an' + (iurlit('img') == 'video' ? 'source' : 'img')).src=document.getElementById('iurl').value; --- > document.getElementById('animg').src=document.getElementById('iurl').value; 242,271d193 < < function iurlit(sug) { < isvideoone=false; < if (document.getElementById('iurl').value.indexOf('data:video') != -1) { < if (document.getElementById('ansource').src != document.getElementById('iurl').value) { < if (1 == 1) { < document.getElementById('anvideo').innerHTMl=''; < } else { < document.getElementById('ansource').type='video/' + document.getElementById('iurl').value.split('data:video/')[1].split(',')[0].split(';')[0]; < document.getElementById('ansource').src=document.getElementById('iurl').value; < } < //document.getElementById('anvideo').play(); < //alert(456); < } < isvideoone=true; < return 'video'; < } else if ((' ' + document.getElementById('iurl').value).slice(-5).indexOf('.') != -1) { < if (xexts.indexOf('.' + (' ' + document.getElementById('iurl').value).slice(-5).toLowerCase().split('.')[1]) != -1) { < if (xtypes[xexts.indexOf('.' + (' ' + document.getElementById('iurl').value).slice(-5).toLowerCase().split('.')[1])].indexOf('video/') == 0) { < if (document.getElementById('ansource').src != document.getElementById('iurl').value) { < document.getElementById('anvideo').innerHTMl=''; < //alert(2456); < } < isvideoone=true; < return 'video'; < } < } < } < return sug; < } 285,291c207 < if (document.getElementById('dettd1')) { < document.getElementById('dettd1').innerHTML=document.getElementById('sumtd1').outerHTML; < } < if (document.getElementById('dettd2')) { < document.getElementById('dettd2').innerHTML=document.getElementById('sumtd2').outerHTML; < } < document.getElementById('sumdi3').innerHTML='

Canvas DrawImage 3 arguments (Positioning) example which is actioned by your form filling and clicking ...

'; --- > document.getElementById('sumdi3').innerHTML='

Canvas DrawImage 3 arguments (Positioning) example which is actioned by your form filling and clicking ...

'; 294c210 < document.getElementById('detdi3').innerHTML+='
  

X:   Y:



'; --- > document.getElementById('detdi3').innerHTML+='
  

X:   Y:



'; 306,312c222 < if (document.getElementById('dettd1')) { < document.getElementById('dettd1').innerHTML=document.getElementById('sumtd1').outerHTML; < } < if (document.getElementById('dettd2')) { < document.getElementById('dettd2').innerHTML=document.getElementById('sumtd2').outerHTML; < } < document.getElementById('sumdi5').innerHTML='

Canvas DrawImage 5 arguments (Positioning and Scaling) example which is actioned by your form filling and clicking ...

'; --- > document.getElementById('sumdi5').innerHTML='

Canvas DrawImage 5 arguments (Positioning and Scaling) example which is actioned by your form filling and clicking ...

'; 315c225 < document.getElementById('detdi5').innerHTML+='
  

X:   Y:   Width:   Height:



'; --- > document.getElementById('detdi5').innerHTML+='
  

X:   Y:   Width:   Height:



'; 327,333c237 < if (document.getElementById('dettd1')) { < document.getElementById('dettd1').innerHTML=document.getElementById('sumtd1').outerHTML; < } < if (document.getElementById('dettd2')) { < document.getElementById('dettd2').innerHTML=document.getElementById('sumtd2').outerHTML; < } < document.getElementById('sumdi9').innerHTML='

Canvas DrawImage 9 arguments (Slicing and Scaling and Cropping) example which is actioned by your form filling and clicking ...

'; --- > document.getElementById('sumdi9').innerHTML='

Canvas DrawImage 9 arguments (Slicing and Scaling and Cropping) example which is actioned by your form filling and clicking ...

'; 336,379c240 < document.getElementById('detdi9').innerHTML+='
  

X:   Y:   Clipped Width:   Clipped Height:   Final X:   Final Y:   Final Width:   Final Height:



'; < break; < < < case 'td1': < document.getElementById('detvideo').style.display='none'; < document.getElementById('previd').style.display='none'; < if (document.getElementById('detdi3')) { < document.getElementById('detdi3').innerHTML=document.getElementById('sumdi3').outerHTML; < } < if (document.getElementById('detdi9')) { < document.getElementById('detdi9').innerHTML=document.getElementById('sumdi9').outerHTML; < } < if (document.getElementById('detdi5')) { < document.getElementById('detdi5').innerHTML=document.getElementById('sumdi5').outerHTML; < } < if (document.getElementById('dettd2')) { < document.getElementById('dettd2').innerHTML=document.getElementById('sumtd2').outerHTML; < } < document.getElementById('sumtd1').innerHTML='

Canvas toDataURL 1 argument (PNG/JPEG/GIF/HEIC/WEBP) example which is actioned by your form filling and clicking ...

'; < document.getElementById('sumtd1').style.display='block'; < document.getElementById('dettd1').style.display='block'; < document.getElementById('dettd1').innerHTML+='
  

X:   Y:

Type:



  


'; < break; < < case 'td2': < document.getElementById('detvideo').style.display='none'; < document.getElementById('previd').style.display='none'; < if (document.getElementById('detdi3')) { < document.getElementById('detdi3').innerHTML=document.getElementById('sumdi3').outerHTML; < } < if (document.getElementById('detdi5')) { < document.getElementById('detdi5').innerHTML=document.getElementById('sumdi5').outerHTML; < } < if (document.getElementById('dettd1')) { < document.getElementById('dettd1').innerHTML=document.getElementById('sumtd1').outerHTML; < } < if (document.getElementById('detdi9')) { < document.getElementById('detdi9').innerHTML=document.getElementById('sumdi9').outerHTML; < } < document.getElementById('sumtd2').innerHTML='

Canvas toDataURL 2 arguments (JPEG/HEIC and Quality) example which is actioned by your form filling and clicking ...

'; < document.getElementById('sumtd2').style.display='block'; < document.getElementById('dettd2').style.display='block'; < document.getElementById('dettd2').innerHTML+='
  

X:   Y:

Type:   Quality:



  


'; --- > document.getElementById('detdi9').innerHTML+='
  

X:   Y:   Clipped Width:   Clipped Height:   Final X:   Final Y:   Final Width:   Final Height:



'; 382d242 < 425c285 <

Video and Captions to Canvas

--- >

Video and Captions to Canvas

440,445d299 < < < < 525,526d378 <
<