File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,6 @@ public extension YouTubePlayer.Source {
9090 startSeconds: startSeconds
9191 )
9292 }
93- case " embed " :
94- // Check if a video identifier is available
95- if let videoId = url? . pathComponents [ safe: 2 ] {
96- // Return video source
97- return . video(
98- id: videoId,
99- startSeconds: startSeconds
100- )
101- }
10293 case " c " , " user " :
10394 // Check if a channel name is available
10495 if let channelName = url? . pathComponents [ safe: 2 ] {
@@ -107,7 +98,7 @@ public extension YouTubePlayer.Source {
10798 name: channelName
10899 )
109100 }
110- case " v " :
101+ default :
111102 // Check if a video identifier is available
112103 if let videoId = url? . pathComponents [ safe: 2 ] {
113104 // Return video source
@@ -116,8 +107,6 @@ public extension YouTubePlayer.Source {
116107 startSeconds: startSeconds
117108 )
118109 }
119- default :
120- break
121110 }
122111 }
123112 // Otherwise return nil
You can’t perform that action at this time.
0 commit comments