Reputation: 74
Catch the file when we "open with" file to a electron app
I have created media player in electron and want any media file to play inside my app whenever i right-click and open with my-app, should play the video, which not happening now. Technically, i want to catch the file and play it, whenever its open-with my-app.
I have created media player in electron and want any media file to play inside my app whenever i right-click and open with my-app, should play the video, which not happening now. Technically, i want to catch the file and play it, whenever its open-with my-app.
I hope you guys will help me to find an answer.
Upvotes: 1
Views: 475
Reputation: 12766
Use the open-file
event on the app
object when running on macOS, on windows you need to parse process.argv
. See the docs: https://electronjs.org/docs/all#event-open-file-macos
Upvotes: 1