Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40402a91cc | ||
|
|
a2c3fd9fa3 |
No files matched your search
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
VERSION = 0.1
|
VERSION = 0.1
|
||||||
BUILD = 2
|
BUILD = 3
|
||||||
|
|
||||||
// Configuration settings file format documentation can be found at:
|
// Configuration settings file format documentation can be found at:
|
||||||
// https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project
|
// https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Scream
|
||||||
|
|
||||||
|
Scream is a fast screensharing app for macOS devices. It uses macOS APIs (`ScreenCaptureKit`) to capture the screen
|
||||||
|
|
||||||
|
### Roadmap
|
||||||
|
- Screen recording
|
||||||
|
- Streaming
|
||||||
|
- Authentication
|
||||||
|
- Client app
|
||||||
|
- Server app
|
||||||
|
- iOS Client app
|
||||||
|
|
||||||
|
### Compilation
|
||||||
|
Make sure Xcode is installedd
|
||||||
|
Clone the repo
|
||||||
|
Open the project in Xcode
|
||||||
|
Select your Team ID
|
||||||
|
Set the destination to "My Mac"
|
||||||
|
Hit Command + R
|
||||||
|
Make sure to allow screen recording permissions
|
||||||
@@ -1,51 +1,61 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 6.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "16x16"
|
"size" : "16x16"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 5.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "16x16"
|
"size" : "16x16"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 4.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "32x32"
|
"size" : "32x32"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 3.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "32x32"
|
"size" : "32x32"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 2.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "128x128"
|
"size" : "128x128"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy 1.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "128x128"
|
"size" : "128x128"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1 copy.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "256x256"
|
"size" : "256x256"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected] 1.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "256x256"
|
"size" : "256x256"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "[email protected]",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "1x",
|
"scale" : "1x",
|
||||||
"size" : "512x512"
|
"size" : "512x512"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "Scream.png",
|
||||||
"idiom" : "mac",
|
"idiom" : "mac",
|
||||||
"scale" : "2x",
|
"scale" : "2x",
|
||||||
"size" : "512x512"
|
"size" : "512x512"
|
||||||
|
|||||||
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 65 KiB |
@@ -476,7 +476,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "${BUILD}";
|
CURRENT_PROJECT_VERSION = 3;
|
||||||
DEVELOPMENT_TEAM = 8JGND254B7;
|
DEVELOPMENT_TEAM = 8JGND254B7;
|
||||||
ENABLE_APP_SANDBOX = YES;
|
ENABLE_APP_SANDBOX = YES;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@@ -521,7 +521,7 @@
|
|||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "${BUILD}";
|
CURRENT_PROJECT_VERSION = 3;
|
||||||
DEVELOPMENT_TEAM = 8JGND254B7;
|
DEVELOPMENT_TEAM = 8JGND254B7;
|
||||||
ENABLE_APP_SANDBOX = YES;
|
ENABLE_APP_SANDBOX = YES;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
|
|||||||
@@ -10,33 +10,41 @@ import Cocoa
|
|||||||
@main
|
@main
|
||||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
let sr = ScreenRecorder()
|
let sr = ScreenRecorder()
|
||||||
|
lazy var preview = CaptureVideoPreview(layer: sr.contentLayer)
|
||||||
|
let button = NSButton(title: "Start Stream", target: self, action: #selector(Button))
|
||||||
|
var isRunning = false
|
||||||
// let udpclient = UDPClientImplementation(port: 03067)
|
// let udpclient = UDPClientImplementation(port: 03067)
|
||||||
// let udpserver = UDPServerImplementation(host: "localhost", port: 03067, initialMessage: "kys")
|
// let udpserver = UDPServerImplementation(host: "localhost", port: 03067, initialMessage: "kys")
|
||||||
|
|
||||||
@IBOutlet var window: NSWindow!
|
@IBOutlet var window: NSWindow!
|
||||||
|
|
||||||
@IBAction func Button(_ sender: Any) {
|
@IBAction func Button(_ sender: Any) {
|
||||||
|
isRunning.toggle()
|
||||||
|
print(isRunning, "\(isRunning ? "Stop" : "Start") Stream")
|
||||||
|
self.button.title = "\(isRunning ? "Stop" : "Start") Stream"
|
||||||
|
preview.layer?.opacity = isRunning ? 1 : 0
|
||||||
Task {
|
Task {
|
||||||
|
if isRunning {
|
||||||
await sr.start()
|
await sr.start()
|
||||||
|
} else {
|
||||||
|
await sr.stop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// @IBAction func Button2(_ sender: Any) {
|
|
||||||
// udpclient.start()
|
|
||||||
// udpserver.start()
|
|
||||||
// }
|
|
||||||
|
|
||||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||||
// Insert code here to initialize your application
|
|
||||||
let preview = CaptureVideoPreview(layer: sr.contentLayer)
|
|
||||||
preview.frame.size = window.contentView!.frame.size
|
|
||||||
window.contentView?.addSubview(preview)
|
window.contentView?.addSubview(preview)
|
||||||
Button(self)
|
window.contentView?.addSubview(button)
|
||||||
// Button2(self)
|
preview.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
||||||
|
preview.leadingAnchor.constraint(equalTo: window.contentView!.leadingAnchor).isActive = true
|
||||||
|
preview.trailingAnchor.constraint(equalTo: window.contentView!.trailingAnchor).isActive = true
|
||||||
|
preview.topAnchor.constraint(equalTo: window.contentView!.topAnchor).isActive = true
|
||||||
|
preview.bottomAnchor.constraint(equalTo: window.contentView!.bottomAnchor).isActive = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationWillTerminate(_ aNotification: Notification) {
|
func applicationWillTerminate(_ aNotification: Notification) { }
|
||||||
// Insert code here to tear down your application
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -89,17 +89,18 @@ class ScreenRecorder: NSObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ScreenRecorder: SCContentSharingPickerObserver {
|
//extension ScreenRecorder: SCContentSharingPickerObserver {
|
||||||
@available(macOS 14, *)
|
// if #available(macOS 14, *) {
|
||||||
func contentSharingPicker(_ picker: SCContentSharingPicker, didCancelFor stream: SCStream?) {
|
// func contentSharingPicker(_ picker: SCContentSharingPicker, didCancelFor stream: SCStream?) {
|
||||||
print("canceleed picker")
|
// print("canceleed picker")
|
||||||
}
|
// }
|
||||||
@available(macOS 14, *)
|
// // @available(macOS 14, *)
|
||||||
func contentSharingPicker(_ picker: SCContentSharingPicker, didUpdateWith filter: SCContentFilter, for stream: SCStream?) {
|
// func contentSharingPicker(_ picker: SCContentSharingPicker, didUpdateWith filter: SCContentFilter, for stream: SCStream?) {
|
||||||
print(picker.description)
|
// print(picker.description)
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
func contentSharingPickerStartDidFailWithError(_ error: any Error) {
|
//
|
||||||
print(error.localizedDescription)
|
// func contentSharingPickerStartDidFailWithError(_ error: any Error) {
|
||||||
}
|
// print(error.localizedDescription)
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
@@ -203,29 +203,16 @@
|
|||||||
<window title="Scream" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
<window title="Scream" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
|
<rect key="contentRect" x="335" y="390" width="800" height="470"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="3200" height="1775"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="3200" height="1775"/>
|
||||||
<view key="contentView" id="EiT-Mj-1SZ">
|
<view key="contentView" id="EiT-Mj-1SZ">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
|
<rect key="frame" x="0.0" y="0.0" width="800" height="470"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
|
||||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8In-w0-vJZ">
|
|
||||||
<rect key="frame" x="180" y="163" width="121" height="32"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
|
||||||
<buttonCell key="cell" type="push" title="stream screen" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ycE-q8-8mw">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="Button:" target="Voe-Tx-rLC" id="9Qu-NJ-TM0"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="top-28-M4D"/>
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="top-28-M4D"/>
|
||||||
</connections>
|
</connections>
|
||||||
<point key="canvasLocation" x="200" y="400"/>
|
<point key="canvasLocation" x="360" y="455"/>
|
||||||
</window>
|
</window>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||