視訊 Plus

小工具 (vPlus) 可讓作者建立與影片同步的 HTML 簡報。相較於傳統影片,vPlus 的優點如下:

  • 投影片可使用 DevSite 功能,例如:
    • 包括方便您重複使用
    • 條件,向不同讀者顯示量身打造的內容。同一張投影片上的 Google 員工會使用內部技術,一般大眾則會看到 Google Cloud Platform 內容

作者可以控制影片要在投影片角落顯示、覆蓋整張投影片,或是在使用者與投影片互動時停止顯示。

示範

以下是 vPlus 功能的示範範例。按下「播放」按鈕即可開始。

VPlus 示範
「標題」注意事項請向投影片中的連結傳送 GET 要求
這張投影片刻意留空,
投影片資訊豐富
  • 很好的條列式說明
  • 另一個能夠提供豐富資訊的條列式摘要
非常好。這張投影片有下列討論要點:
  • 筆記與投影片本身可以呈現的內容
    • 兩者都可以包含 HTML 或 Markdown
    • 對觀眾顯示特定內容是否有幫助 或單憑 400 的音符 而且系統可能會朗讀出來
  • 使用者可以自行檢視記事,一般需離線檢視。
  • 新增附註 連結至示範
不錯、資訊豐富的貓相片
以下是一些互動式內容
天空是哪種顏色?
藍色
但你知道為什麼
紫色
不太實用
靛藍色
很接近,但不完全正確
綠色
你來自哪個星球?
請注意,開啟互動式投影片時 請按一下「播放」按鈕, 或「下一張投影片」按鈕才能繼續。
如要閱讀更多互動式內容,請參閱《Blockly
謝謝觀賞!
  • Video Plus 能提高影片播放次數和播放投影片
  • 減少投影片變動時重新錄影的需求
  • 提供可搜尋的轉錄稿
  • 暫停影片使用者互動情形
  • 影片可以切換顯示大小

結構定義

透過將元素標記為 devsite-vplus 類別,即可建立 Video Plus 小工具。此外,該元素必須包含 data-video-id 屬性,用於指定要顯示的 YouTube 影片 ID。

如果小工具元素也包含 data-captions-url 屬性,則應指定含有影片對應字幕的 json 檔案。這個檔案必須位於與 mdhtml 檔案相同的目錄中,或是以「/」開頭,檔案路徑則從根目錄開始。如要進一步瞭解這個檔案的格式和產生方式,請參閱 vPlus 影片播放器。您必須從影片中手動擷取字幕檔;請參閱 //engedu/common/vplus/README.md 瞭解詳情以及產生字幕檔的工具。

此外,devsite-vplus 元素應包含類別為 devsite-vplus-content-container 的元素。反過來,該元素應包含具有 devsite-vplus-slide-frame 類別的元素。

系統會將 devsite-vplus-slide-frame 元素中的每個元素視為投影片。投影片必須依時間順序列出。每個投影片元素都必須含有 data-start-time 屬性,用於指定播放這張投影片的時間 (以秒為單位)。此外,每張投影片都有 data-video-mode 屬性。該屬性有兩個有效值:

  • 「large」:使影片佔據大部分的投影片空間,覆蓋投影片空間。
  • 「stopped」:在使用者到達投影片時暫停播放影片。

如果未指定 data-video-mode,影片會預設為小尺寸。

投影片作者可能會想為投影片指定額外的 CSS。由於投影片包含在具有 devsite-vplus-slide-frame 類別的 div 中,因此投影片專屬的 CSS 樣式可以命名空間為這個類別的子項元素。

例如:

<style>
    .devsite-vplus-slide-frame h1 {
      background-color: #4285F4;
      border-bottom: 1px solid #7BAAF7;
      color: #fff;
      margin: 0;
      padding: 10px;
      top: 0 !important;
    }
    /* More styles... */
  </style>
  <div class="devsite-vplus" data-video-id="PXVnv_Paexc" data-captions-url="video-plus-captions.json">
  <div class="devsite-vplus-content-container">
    <div class="devsite-vplus-slide-frame">
      <div data-start-time=0 class="title-background">
        <div class="header1 title">vPlus Demo</div>
      </div>
      <div data-slide-note=true>
        Note for the 'title' slide.
      </div>
      <div data-start-time=2 data-video-mode="large">
        <!-- Intentionally left blank -->
      </div>
      <div data-slide-note=true>
        This slide was intentionally left blank.
      </div>
      <div data-start-time=13>
        <div class="header2">Nice Informative Slide</div>
        <ul>
          <li>Nice, informative bullet point</li>
          <li>Another nice, informative bullet point</li>
        </ul>
      </div>
      <div data-slide-note=true>
        Very meta.  In this note, we could talk about several things:
        <ul>
          <li>What could go in the note versus in the slide itself.
            <ul>
              <li>Either can contain HTML or markdown</li>
              <li>Whether it would be useful to display something to the viewer
                or only in the notes that the presenter would presummably
                see and may read out loud.</li>
            </ul>
          </li>
          <li>Users may view notes themselves, usually offline.</li>
          <li>Notes could be a way of
            <a href="#demo">linking to demos</a>.
          </li>
        </ul>
      </div>
      <div data-start-time=21>
        <div class="header2">Nice, informative cat picture</div>
        <div>
          <!-- Image CCO Public Domain at https://pixabay.com/en/kitten-cute-feline-kitty-domestic-1246693/ -->
          <img class="cat-pic" src="https://cdn.pixabay.com/photo/2016/03/09/15/31/kitten-1246693_1280.jpg">
        </div>
      </div>
      <div data-start-time=32 data-video-mode="stopped">
        <div class="header2">Here's some interactive content</div>
        <div>
          <devsite-multiple-choice>
            <div>What color is the sky?</div>
            <div correct>
              <div>Blue</div>
              <div>But do you know <b>why</b>?</div>
            </div>
            <div>
              <div>Purple</div>
              <div>Not really</div>
            </div>
            <div>
              <div>Indigo</div>
              <div>Close but not quite</div>
            </div>
            <div>
              <div>Green</div>
              <div>What planet are you from?</div>
            </div>
          </devsite-multiple-choice>
        </div>
      </div>
      <div data-slide-note="true">
        Note, when an interactive slide is reached,
        you have to click the 'Play' button,
        or the 'Next Slide' button in order to continue.
      </div>
      <div data-start-time=33 data-video-mode="stopped">
        <div class="header2">Here's some more interactive content - <a href="/blockly/">Blockly</a></div>
        <iframe style="height: 75%; width: 90%; margin: 0 5%;" src="/blockly/blockly-demo/blockly-demo"></iframe>
      </div>
      <div data-start-time=34 data-video-mode="large">
        <!-- Intentionally left blank -->
      </div>
      <div data-start-time=78>
        <div>
          <div class="header2">Thanks for watching!</div>
          <ul>
            <li>Video Plus drives video play and slides</li>
            <li>Reduces need to reshoot video if slides change</li>
            <li>Provides searchable transcript</li>
            <li>Pauses video for user interactions</li>
            <li>Video can switch between large and small</li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>

當 vPlus 小工具在網頁上顯示時,影片播放器不會自動開始,不過在使用者按下播放按鈕後,系統會自動推進投影片和字幕 (如有顯示)。使用者也可以使用下列滑鼠和鍵盤動作與小工具互動。