動画上にクリッカブルマップを作成する方法

カテゴリ video コアバージョン 8.4x 関連モジュール video map

 

コメント

ユーザー actbrain の写真

動画の上にクリッカブルなレイアーを配置することで実現可能です。
下の動画の「左上」「左下」「右上」「右下」でクリックしてみてください。

この例は動画の上にセルが4つのtableを配置しalertしているだけですが、tableの代わりにクリッカブルマップを配置するような事もできると思います。

<style>
    div.wrapper { position: relative; width: 600px; height: 400px; }
    div.wrapper #map { position: absolute; left: 0; top: 0; z-index: 1; width: 600px; height: 400px; }
    #map td { width: 300px; heigth: 200px; }
</style>
<div class="wrapper">
    <video id="test1" width="600" height="400" controls autoplay>
        <source src="./sites/default/files/mini-3.mp4" type="video/mp4">
        <p>※ご利用のブラウザでは再生できません</p>
    </video>
    <table id="map">
        <tbody>
        <tr>
            <td onclick="alert('左上')"></td>
            <td onclick="alert('右上')"></td>
        </tr>
        <tr>
            <td onclick="alert('左下')"></td>
            <td onclick="alert('右下')"></td>
        </tr>
        </tbody>
    </table>
</div>

ページ

OTHER FAQ