mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-09-21 05:43:27 +08:00
feat(electron): project import/new-project IPC, menu wiring, HUD/editor anti-flash
- preload + native bridge: getPathForFile, loadProjectFileFromPath, and onMenuNewProject / onMenuImportVideo listeners. - main process: New Project File-menu item (Cmd/Ctrl+N) + menu-new-project. - handlers: broaden import video formats (.m4v, .wmv, .flv, .ts). - windows: keep main's HUD geometry + draggable handler; re-apply the show-on-ready-to-show anti-flash for the HUD and editor windows.
This commit is contained in:
@@ -16,6 +16,7 @@ interface ProjectServiceOptions {
|
||||
) => Promise<ProjectFileResult>;
|
||||
loadProjectFile: () => Promise<ProjectFileResult>;
|
||||
loadCurrentProjectFile: () => Promise<ProjectFileResult>;
|
||||
loadProjectFileFromPath: (path: string) => Promise<ProjectFileResult>;
|
||||
setCurrentVideoPath: (path: string) => ProjectPathResult | Promise<ProjectPathResult>;
|
||||
getCurrentVideoPathResult: () => ProjectPathResult;
|
||||
clearCurrentVideoPath: () => ProjectPathResult;
|
||||
@@ -60,6 +61,12 @@ export class ProjectService {
|
||||
return result;
|
||||
}
|
||||
|
||||
async loadProjectFileFromPath(path: string) {
|
||||
const result = await this.options.loadProjectFileFromPath(path);
|
||||
this.getCurrentContext();
|
||||
return result;
|
||||
}
|
||||
|
||||
async setCurrentVideoPath(path: string) {
|
||||
const result = await this.options.setCurrentVideoPath(path);
|
||||
this.getCurrentContext();
|
||||
|
||||
Reference in New Issue
Block a user