| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  | <div class="non-autoplay-gifv" style="width: {width}px; height: {height}px;" | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |      on:mouseover="onMouseOver(event)" | 
					
						
							|  |  |  |      ref:node | 
					
						
							|  |  |  | > | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |   {#if playing} | 
					
						
							| 
									
										
										
										
											2018-03-31 10:45:11 -07:00
										 |  |  |     <AutoplayVideo | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |       className={class} | 
					
						
							|  |  |  |       ariaLabel={label} | 
					
						
							|  |  |  |       {poster} | 
					
						
							|  |  |  |       {src} | 
					
						
							|  |  |  |       {width} | 
					
						
							|  |  |  |       {height} | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |       /> | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |   {:else} | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |     <LazyImage | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |       alt={label || ''} | 
					
						
							|  |  |  |       title={label || ''} | 
					
						
							|  |  |  |       src={staticSrc} | 
					
						
							|  |  |  |       fallback={oneTransparentPixel} | 
					
						
							|  |  |  |       {width} | 
					
						
							|  |  |  |       {height} | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |       background="var(--loading-bg)" | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |       className={class} | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |     /> | 
					
						
							| 
									
										
										
										
											2018-05-01 17:05:36 -07:00
										 |  |  |   {/if} | 
					
						
							|  |  |  |   <PlayVideoIcon className={playing ? 'hidden' : ''}/> | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  | </div> | 
					
						
							|  |  |  | <style> | 
					
						
							|  |  |  |   .non-autoplay-gifv { | 
					
						
							|  |  |  |     cursor: zoom-in; | 
					
						
							| 
									
										
										
										
											2018-03-10 11:28:30 -08:00
										 |  |  |     position: relative; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   :global(.non-autoplay-gifv .play-video-icon) { | 
					
						
							|  |  |  |     transition: opacity 0.2s linear; | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |   } | 
					
						
							|  |  |  | </style> | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  |   import { mouseover } from '../_utils/events' | 
					
						
							| 
									
										
										
										
											2018-03-10 11:28:30 -08:00
										 |  |  |   import PlayVideoIcon from './PlayVideoIcon.html' | 
					
						
							| 
									
										
										
										
											2018-03-09 23:30:17 -08:00
										 |  |  |   import { ONE_TRANSPARENT_PIXEL } from '../_static/media' | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |   import LazyImage from './LazyImage.html' | 
					
						
							| 
									
										
										
										
											2018-03-31 10:45:11 -07:00
										 |  |  |   import AutoplayVideo from './AutoplayVideo.html' | 
					
						
							| 
									
										
										
										
											2018-03-09 23:30:17 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |   export default { | 
					
						
							|  |  |  |     methods: { | 
					
						
							| 
									
										
										
										
											2018-04-19 21:38:01 -07:00
										 |  |  |       onMouseOver (mouseOver) { | 
					
						
							| 
									
										
										
										
											2018-08-29 21:42:57 -07:00
										 |  |  |         this.set({ playing: mouseOver }) | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |       } | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     events: { | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |       mouseover | 
					
						
							| 
									
										
										
										
											2018-03-09 23:30:17 -08:00
										 |  |  |     }, | 
					
						
							|  |  |  |     data: () => ({ | 
					
						
							|  |  |  |       oneTransparentPixel: ONE_TRANSPARENT_PIXEL | 
					
						
							| 
									
										
										
										
											2018-03-10 11:28:30 -08:00
										 |  |  |     }), | 
					
						
							|  |  |  |     components: { | 
					
						
							| 
									
										
										
										
											2018-03-13 23:07:30 -07:00
										 |  |  |       PlayVideoIcon, | 
					
						
							| 
									
										
										
										
											2018-03-31 10:45:11 -07:00
										 |  |  |       LazyImage, | 
					
						
							|  |  |  |       AutoplayVideo | 
					
						
							| 
									
										
										
										
											2018-03-10 11:28:30 -08:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-02-01 18:48:59 -08:00
										 |  |  |   } | 
					
						
							|  |  |  | </script> |