mirror of
				https://github.com/AlexxIT/go2rtc.git
				synced 2025-10-31 11:46:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			419 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			419 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package ivideon
 | |
| 
 | |
| import (
 | |
| 	"github.com/AlexxIT/go2rtc/cmd/streams"
 | |
| 	"github.com/AlexxIT/go2rtc/pkg/ivideon"
 | |
| 	"github.com/AlexxIT/go2rtc/pkg/streamer"
 | |
| 	"strings"
 | |
| )
 | |
| 
 | |
| func Init() {
 | |
| 	streams.HandleFunc("ivideon", func(url string) (streamer.Producer, error) {
 | |
| 		id := strings.Replace(url[8:], "/", ":", 1)
 | |
| 		prod := ivideon.NewClient(id)
 | |
| 		if err := prod.Dial(); err != nil {
 | |
| 			return nil, err
 | |
| 		}
 | |
| 		return prod, nil
 | |
| 	})
 | |
| }
 | 
