2016-08-17 95 views
1

我在我的應用程序中使用kaltura動態嵌入播放器,用戶可以設置提示點到視頻。當我在視頻上設置任何提示點時,它不會立即反映在玩家身上。有時需要2或3分鐘才能反映出來。我們正在提供預覽功能,所以這就是爲什麼我需要立即。Kaltura:提示點不立即觸發

添加中cuePoints上kaltura

var cuePoint = new kaltura.kc.objects.KalturaAdCuePoint(); 
     cuePoint.entryId = entryId; 
     cuePoint.startTime = startTime; 
     cuePoint.title = title; 
kalturaClient.cuePoint.add(function(results) { 
       callback(results); 
      }); 

活動聽提示點

kWidget.embed({ 
     'targetId': 'embedPlayer', 
     'wid': '', 
     'uiconf_id' : '', 
     'entry_id' : entry_id, 
     'flashvars':{ 
      'autoPlay': false, 
     }, 
     height:height, 
     width:width, 
     'readyCallback': function(playerId){ 
      console.log("kWidget player ready: " + playerId); 
      player = $('#' + playerId).get(0); 
      player.kBind("adOpportunity", "cuePointReached"); 
     } 
    }) 

var cuePointReached = function(qPoint){ 
    console.log("cuePointReached " + qPoint) 
} 

我只是想知道,是不是kaltura的行爲,或我做錯了什麼?

在此先感謝

回答

1

我們可以在運行時覆蓋提示點數據。

<script> 
    kWidget.embed({ 
     'targetId': 'kaltura_player', 
     'wid': '_243342', 
     'uiconf_id' : '13306622', 
     'entry_id' : '0_uka1msg4', 
     'flashvars': { 
      'vast': { 
       'trackCuePoints': true 
      }, 
      'mediaProxy':{ 
       'entry':{ 
        'name':"This shows partial runtime override of entry name" 
       }, 
       'entryCuePoints': [{ 
        "protocolType": 1, 
        "adType": 1, 
        "cuePointType": "adCuePoint.Ad", 
        "startTime": 5000, 
        "sourceUrl": "http://projects.kaltura.com/mdale/hotelVastAd.xml" 
       }] 
      } 
     }, 
    }) 
</script> 
+0

完美的作品!謝謝! –