GUI fields now trim leading and trailing whitespace:
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import "mxl-player/internal/playback"
|
||||
|
||||
func desiredVideoFeed(
|
||||
snapshot playback.SessionSnapshot,
|
||||
available bool,
|
||||
) playback.FeedConfig {
|
||||
if !available {
|
||||
return playback.FeedConfig{}
|
||||
}
|
||||
switch snapshot.Plan.Topology {
|
||||
case playback.TopologyIndependent:
|
||||
if snapshot.Plan.Video.Active {
|
||||
return snapshot.Plan.Video
|
||||
}
|
||||
case playback.TopologySynchronized:
|
||||
if snapshot.Plan.Sync.Active() {
|
||||
return snapshot.Plan.Sync.Video
|
||||
}
|
||||
}
|
||||
return playback.FeedConfig{}
|
||||
}
|
||||
|
||||
func shouldShowVideo(
|
||||
desired playback.FeedConfig,
|
||||
delivered playback.FeedConfig,
|
||||
) bool {
|
||||
return desired.Active && sameVideoSource(desired, delivered)
|
||||
}
|
||||
Reference in New Issue
Block a user