support /live/ urls
This commit is contained in:
		
							parent
							
								
									c673a4dbc9
								
							
						
					
					
						commit
						7d1cdf0952
					
				| 
						 | 
					@ -14,6 +14,8 @@ function validateVideo(input: string): string | false {
 | 
				
			||||||
        videoId = url.searchParams.get('v')!
 | 
					        videoId = url.searchParams.get('v')!
 | 
				
			||||||
      } else if (url.pathname.startsWith('/shorts/')) {
 | 
					      } else if (url.pathname.startsWith('/shorts/')) {
 | 
				
			||||||
        videoId = url.pathname.replace('/shorts/', '')
 | 
					        videoId = url.pathname.replace('/shorts/', '')
 | 
				
			||||||
 | 
					      } else if (url.pathname.startsWith('/live/')) {
 | 
				
			||||||
 | 
					        videoId = url.pathname.replace('/live/', '')
 | 
				
			||||||
      } else return false
 | 
					      } else return false
 | 
				
			||||||
      // removed - embed url
 | 
					      // removed - embed url
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue