-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS port #5
Comments
Initial prototype here: https://github.com/Ivshti/wry/blob/dev/examples/transparent.rs next steps:
Two interesting things discovered in those tests
|
next steps:
|
Another update
|
It appears mpv has deprecated window embedding on macOS so this prototype should be re-made. |
some performance tests done on an m3 max mbp, measuring CPU time and GPU time over 2 minutes of BBB (https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4) all tests done with mpv 0.39.0, except stremio
the good news is that the best performer is the cocoa-rendergl libmpv example, which is what we'd be basing our shell on |
closing in favor of #9 |
Summary
This draws inspiration from https://github.com/Ivshti/playback-native/blob/master/index.js, which is a VLC+WebView combo on macOS
Turns out that we can do the same with libMPV, since it can be given a pointer to
NSView
as thewid
(like HWND on Windows): https://github.com/mpv-player/mpv-examples/blob/master/libmpv/cocoa/cocoabasic.m#L104The only missing piece is how we initiate the window and webview.
WebView libraries
Most of them use WKWebView (“Starting in iOS 8.0 and OS X 10.10, use WKWebView to add web content to your app.Do not use UIWebView or WebView.”)
The best option is probably to use cocoa/objc directly, as the code will port almost 1:1
Here's an initial prototype: https://github.com/Ivshti/wry/blob/dev/examples/transparent.rs
The text was updated successfully, but these errors were encountered: