新增廣告

  1. 定義廣告中繼資料。

    var auditudeSettings = new AdobePSDK.AuditudeSettings();
      auditudeSettings.domain = "auditude.com";
      auditudeSettings.mediaId = "adbe_tearsofsteel2";
      auditudeSettings.zoneId = "123869";
    
  2. 將廣告中繼資料新增至MediaResource

    var mediaResource =
      new AdobePSDK.MediaResource(resourceUrl, resourceType, auditudeSettings, false);
    
  3. 將設定添加到配置並添加SpliceOut解析器工廠。

    var config = new AdobePSDK.MediaPlayerItemConfig();
    config.advertisingMetadata = auditudeSettings;
    config.advertisingFactory = new ExtCueOutContentFactory(auditudeSettings);
    
  4. ExtCueOutContentFactory新增至程式庫區段。

  5. 從程式庫區段下載ExtCueOutContentFactory.js,並將它放置在工作資料夾中。

    <script src= "frameworks/player/dash.min.js"></script>
    <script src= "frameworks/player/primetimemain.min.js"></script>
    <script src= "frameworks/player/swfobject.js"></script>
    <script src= "frameworks/player/primetimeei.min.js"></script>
    <script src= "ExtCueOutContentFactory.js"></script>
    
  6. 測試您的設定。

本頁內容