Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add video demo app #8

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions libs/system/sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ const element = {
}
return elementObject;
},
autoplay: () => {
elm.autoplay = true;
return elementObject;
},
controls: () => {
elm.controls = true;
return elementObject;
},
placeholder: (string) => {
elm.placeholder = string
return elementObject;
Expand Down Expand Up @@ -574,10 +582,8 @@ const strings = {
greeting = "Good Morning";
} else if (currentHour >= 12 && currentHour < 18) {
greeting = "Good Afternoon";
} else if (currentHour >= 18 && currentHour < 22) {
greeting = "Good Evening";
} else {
greeting = "Good Night";
greeting = "Good Evening";
}
return greeting;
}
Expand Down
1 change: 1 addition & 0 deletions pkgs/apps/desktop/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ addDesktopApp('About', 'assets/icons/computer.svg', 'apps:sysver.js');
addDesktopApp('VirtualPC', 'assets/icons/questionmark.svg', 'apps:virtualpc.js');
addDesktopApp('AzuText', 'assets/icons/questionmark.svg', 'apps:azutext.js');
addDesktopApp('AzuTheme', 'assets/icons/questionmark.svg', 'settings:azutheme.js');
addDesktopApp('Video Demo', 'assets/icons/questionmark.svg', 'apps:videodemo.js');

// addDesktopApp('Settings', 'assets/icons/settings.svg', 'settings/index.html');
// console.log(fetch_directory('~/Desktop'));
Expand Down
14 changes: 14 additions & 0 deletions pkgs/apps/videodemo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
win.create(`Video Demo - Big Buck Bunny`, "videodemo").then(win => win
.setWidth(700)
.setHeight(500)
.confirm()
);

element.create('video', ``, "videoelem").then(elm => elm
.window("videodemo")
.textalign('center')
.src('http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_normal.mp4')
.css("width: 100%; height: 100%;")
.controls()
.autoplay()
);
4 changes: 1 addition & 3 deletions pkgs/system/bootscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ if (__skipBoot === true) {
greeting = "Good Morning";
} else if (currentHour >= 12 && currentHour < 18) {
greeting = "Good Afternoon";
} else if (currentHour >= 18 && currentHour < 22) {
greeting = "Good Evening";
} else {
greeting = "Good Night";
greeting = "Good Evening";
}

document.getElementById("welcometextobject").innerHTML = greeting;
Expand Down