Platforms to show: All Mac Windows Linux Cross-Platform
/AVFoundation/AVRouteDetector Test
Required plugins for this example: MBS AVFoundation Plugin, MBS MacCG Plugin, MBS MacCF Plugin, MBS Main Plugin, MBS MacBase Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /AVFoundation/AVRouteDetector Test
This example is the version from Mon, 2nd Feb 2020.
Project "AVRouteDetector Test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open()
If AVRouteDetector.available Then
RouteDetector = new AVRouteDetector
Log "RouteDetection enabled..."
RouteDetector.RouteDetectionEnabled = True
Else
Log "Not available"
End If
End EventHandler
Sub Changed()
Log "State changed"
If RouteDetector.MultipleRoutesDetected Then
Log "we have multiple routes"
Else
Log "we have only one route"
End If
End Sub
Sub log(s as string)
List.AddRow s
End Sub
Property RouteDetector As AVRouteDetector
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Class AVRouteDetector Inherits AVRouteDetectorMBS
EventHandler Sub MultipleRoutesDetectedDidChange()
MainWindow.Changed
End EventHandler
End Class
End Project
The items on this page are in the following plugins: MBS AVFoundation Plugin.