ソースを参照

Add neo option, configurable videos

remove videos from repo
master
The Dod 1週間前
コミット
539f6f4f40
8個のファイルの変更37行の追加5行の削除
  1. 1
    0
      .gitignore
  2. 4
    0
      app.py
  3. 14
    0
      static/js/config.js.example
  4. 2
    0
      static/text/hossam-shabat.txt
  5. 4
    0
      static/video/README.md
  6. バイナリ
      static/video/hossam-shabat-bg-effect.mp4
  7. バイナリ
      static/video/hossam-shabat1b.mp4
  8. 12
    5
      templates/index.html

+ 1
- 0
.gitignore ファイルの表示

@@ -2,4 +2,5 @@ venv
2 2
 __pycache__
3 3
 work/
4 4
 static/js/config.js
5
+static/video
5 6
 HuzzahAPDistance/config.h

+ 4
- 0
app.py ファイルの表示

@@ -22,6 +22,10 @@ def main():
22 22
 @app.route("/d")
23 23
 def distance():
24 24
     return {"distance": get_distance()}
25
+    
26
+@app.route("/n")
27
+def neo():
28
+    return render_template("neo.html")
25 29
 
26 30
 @app.route("/p")
27 31
 def progbar():

+ 14
- 0
static/js/config.js.example ファイルの表示

@@ -2,3 +2,17 @@ const MAX_DIST = 3500;
2 2
 const MIN_DIST = 1000;
3 3
 const VID_BLUR_WHEN_CLOSE = 23.0; // float
4 4
 const TICKER_BLUR_WHEN_FAR = 5.0; // float
5
+const ITEMS = [
6
+    {
7
+        "vid": "anas-al-sharif-1.mp4",
8
+        "ticker": "• צה\"ל חיסל מחבל חמאס - ששימש כעיתונאי בכיר ברשת אל-ג'זירה • אנס א-שריף, שעבד עבור הרשת הקטארית - קידם במקביל מתווי ירי רקטות נגד ישראל • לפי הדיווחים ברצועה, חמישה בני אדם נהרגו בתקיפה, בהם עיתונאי נוסף של אל-ג'זירה • ספיר ליפקין וניצן שפירא, חדשות 12, 11/8/25"
9
+    },
10
+    {
11
+        "vid": "mariam-abu-daqqa.mp4",
12
+        "ticker": "• ייתכן שהמסר של הפגיעה ב\"עיתונאים\", במרכאות, זו ההבנה בישראל כמה נזק עשו אותם אלה שהעבירו את תמונות הרעב והצד האחד של חמאס, והמשיכו את מורשתו של יחיא סינוואר בעיתונות כביכול • אם כבר ישראל מחליטה לחסל את העיתונאים, עדיף מאוחר מאשר אף פעם לא. השפיץ של הזרוע הצבאית של חמאס, אלו אותם עיתונאי נוחבות, לכן טוב עשתה ישראל שחיסלה אותם, לטעמי מאוחר מדי • צבי יחזקאלי, 25/8/24, i24"
13
+    },
14
+    {
15
+        "vid": "hossam-shabat-1.mp4",
16
+        "ticker": "• חוסל מחבל חמאס שעבד עם \"אל-ג'זירה\" • צה\"ל חשף כי לפי מידע מודיעיני, כתב \"פלשתין אל יום\" ו-\"אל-ג'זירה\" חוסאם שבאת הוא מחבל בגדוד בית חאנון של ארגון הטרור חמאס • שחר קליימן, ישראל היום, 24/2/25"
17
+    }
18
+];

+ 2
- 0
static/text/hossam-shabat.txt ファイルの表示

@@ -1 +1,3 @@
1 1
 חוסל מחבל חמאס שעבד עם "אל-ג'זירה" • ברצועה מדווחים על הרוגים בתקיפות במחנה נוסיראת ובדרום חאן יונס • בין ההרוגים - כתב "פלשתין אל יום" וכתב "אל-ג'זירה" חוסאם שבאת • צה"ל חשף כי לפי מידע מודיעיני, חוסאם שבאת הוא מחבל בגדוד בית חאנון של ארגון הטרור חמאס • שחר קליימן, ישראל היום, 24/2/25
2
+
3
+"חוסל מחבל חמאס שעבד עם \"אל-ג'זירה\" • צה\"ל חשף כי לפי מידע מודיעיני, כתב \"פלשתין אל יום\" ו-\"אל-ג'זירה\" חוסאם שבאת הוא מחבל בגדוד בית חאנון של ארגון הטרור חמאס • שחר קליימן, ישראל היום, 24/2/25"

+ 4
- 0
static/video/README.md ファイルの表示

@@ -0,0 +1,4 @@
1
+### Video folder
2
+
3
+This folder is not part of the repo.
4
+[../../confing.js.example](../../confing.js.example) includes names of videos that should be here.

バイナリ
static/video/hossam-shabat-bg-effect.mp4 ファイルの表示


バイナリ
static/video/hossam-shabat1b.mp4 ファイルの表示


+ 12
- 5
templates/index.html ファイルの表示

@@ -11,8 +11,8 @@
11 11
   <div class="container-fluid text-center">
12 12
     <div class="row">
13 13
       <div class="col12">
14
-        <video id="the-video" style="height:100vh; margin:0 auto" class="object-fit-contain" muted autoplay loop>
15
-          <source src="/static/video/hossam-shabat-bg-effect.mp4"/>
14
+        <video id="the-video" style="height:100vh; margin:0 auto" class="object-fit-contain" muted>
15
+          <source id="vid-src" type="video/mp4" src=""/>
16 16
         </video>
17 17
       </div>
18 18
     </div>
@@ -39,10 +39,17 @@
39 39
       "speed": 69
40 40
     });
41 41
   }
42
+  window.item_index = 0;
43
+  function nextItem() {
44
+    document.getElementById("vid-src").setAttribute('src', '/static/video/'+ITEMS[item_index].vid);
45
+    document.getElementById("the-video").load();
46
+    document.getElementById("the-video").play();
47
+    setTicker(ITEMS[item_index].ticker);
48
+    item_index = (item_index+1)%ITEMS.length;
49
+  }
42 50
   $(()=> {
43
-    setTicker(
44
-"חוסל מחבל חמאס שעבד עם \"אל-ג'זירה\" • ברצועה מדווחים על הרוגים בתקיפות במחנה נוסיראת ובדרום חאן יונס • בין ההרוגים - כתב \"פלשתין אל יום\" וכתב \"אל-ג'זירה\" חוסאם שבאת • צה\"ל חשף כי לפי מידע מודיעיני, חוסאם שבאת הוא מחבל בגדוד בית חאנון של ארגון הטרור חמאס • שחר קליימן, ישראל היום, 24/2/25"
45
-    );
51
+    document.getElementById('the-video').addEventListener('ended',nextItem);
52
+    nextItem();
46 53
   });
47 54
   async function getDistance() {
48 55
     try {

読み込み中…
キャンセル
保存