Skip to content

Commit

Permalink
Minor code cleanup in video examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarmadka committed Aug 27, 2024
1 parent 979f7ed commit d6278aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
12 changes: 8 additions & 4 deletions Examples/video.alusus
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Apm.importFile("Alusus/Threading");
Apm.importFile("Alusus/WebPlatform");
use Srl;
use WebPlatform;

@uiEndpoint["/"]
@title["WebPlatform Example - video"]
@title["WebPlatform Example - Video"]
func video {
Window.instance.style.{
padding = Length4.pt(0);
Expand All @@ -17,7 +18,7 @@ func video {
layout = Layout.COLUMN;
};
addChildren({
Text(String("video Example")).{
Text(String("Video Example")).{
style.{
fontColor = Color(0, 0, 0);
fontSize = Length.pt(30.0);
Expand All @@ -31,7 +32,10 @@ func video {
fontSize = Length.pt(12.0);
};
def src: Array[VideoSource];
def vs: VideoSource(String("https://static.vecteezy.com/system/resources/previews/001/622/851/mp4/mobile-and-website-designer-designing-a-mobile-application-free-video.mp4"), String("mp4"));
def vs: VideoSource(String(
"https://static.vecteezy.com/system/resources/previews/001/622/851/mp4/"
"mobile-and-website-designer-designing-a-mobile-application-free-video.mp4"
), String("mp4"));
src.add(vs);
sourceArray = src;
controls = true;
Expand All @@ -50,4 +54,4 @@ func startServer {
runServer({ "listening_ports", "8010", "static_file_max_age", "0" });
}

startServer()؛
startServer();
11 changes: 7 additions & 4 deletions Examples/فيديو.أسس
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
النسق = نـسق._عمود_؛
أضف_فروع({
كـتابة(نـص("مثال الدردشة")).{
كـتابة(نـص("مثال فيديو")).{
الطراز.{
لون_الخط = لـون(0، 0، 0)؛
حجم_الخط = مـسافة.نقاط(30.0)؛
Expand All @@ -41,12 +41,15 @@
الطول = مـسافة.مئوي(100)؛
};
عرف مصادر: مـصفوفة[مـصدر_فيديو];
عرف مصدر_فيديو: مـصدر_فيديو(نـص("https://static.vecteezy.com/system/resources/previews/001/622/851/mp4/mobile-and-website-designer-designing-a-mobile-application-free-video.mp4"), نـص("mp4"));
عرف مصدر_فيديو: مـصدر_فيديو(نـص(
‏ "https://static.vecteezy.com/system/resources/previews/001/622/851/mp4/"
‏"mobile-and-website-designer-designing-a-mobile-application-free-video.mp4"
), نـص("mp4"));
مصادر.أضف(مصدر_فيديو);
مصفوفة_مصدر = مصادر;
التحكمات = 1;
}
})
})؛
})؛

نفذ_حلقة_معالجة_الأحداث()؛
Expand All @@ -63,4 +66,4 @@
شغل_الخادم({ "listening_ports"، "8010"، "static_file_max_age"، "0" })؛
}

ابدأ_خادم()
ابدأ_خادم()؛

0 comments on commit d6278aa

Please sign in to comment.