2017-05-15 10 views
0

私たちのホームページには、モーダルで開き、ユーザーがテキストリンクをクリックすると再生されるWistia埋め込みがあります。特別なURLを作成して、自動的にモーダルを開き、再生を開始しないようにすることができます。Wistia:再生せずに特定のURL経由でモーダルを開く

HTML:

<span class="wistia_embed wistia_async_i74bcbgfkm popover=true popoverAnimateThumbnail=true popoverContent=link wistia_embed_initialized" style="display:inline" id="wistia-i74bcbgfkm-1"> 
    <div id="wistia_36.thumb_container" class="wistia_click_to_play" style="position: relative; display: inline;"> 
    <a class="text-link" href="#">See the science. Watch video.</a> 
    </div> 
</span> 

JS:

// Auto Play Wistia Video via Specific Link 

$(document).ready(function() { 

    if(window.location.href.indexOf('#science') != -1) { 
    ## open modal? 
    } 

}); 

これは可能ですか?

+1

http://wistia.comで人に尋ねることができますか? –

+0

ねえ、ありがとう - 私はそれらをこの記事にリンクした –

答えて

1

ちょうど同じ問題つまずくと、ここで私はそれを固定方法は次のとおりです。

⚠️常にあなたWistiaビデオの同じIDを使用して注意してください。

<script src="https://fast.wistia.com/embed/medias/m1h6asljqh.jsonp"></script> 
<script src="https://fast.wistia.com/assets/external/E-v1.js"></script> 
<span class="wistia_embed wistia_async_m1h6asljqh popover=true popoverContent=link" style="display:inline"> 
    <a href="#" class="">What is Marker.io?</a> 
</span> 

<script> 
    window._wq = window._wq || []; 

    _wq.push({ id: "m1h6asljqh", onReady: function(video) { 

     var video = Wistia.api("m1h6asljqh"); 

     if(window.location.href.indexOf('#showvideo') != -1) { 
     video.popover.show(); // open the popover 
     video.play(); // play the video 
     } 
    }}); 
</script> 

助けてくれたら教えてください!

乾杯

関連する問題