如何使我的jwplayer视频响应?

时间:2018-06-12 12:56:21

标签: html css jwplayer

我在Fresca CMS页面中有一个视频,如下所示

<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="https://content.jwplatform.com/libraries/ovBRFdgO.js"></script>

<div class="container u-spacer-v">
<div class="row">
    <div class="col-lg-12 spacer50">    
        <div class="videoWrapper">
            <div id="media_player"></div>

            <script type="text/javascript">
                var playerInstance;

                $(document).ready(function () {
                    playerInstance = jwplayer("media_player").setup({
                        "playlist": [{
                            "sources": [{
                                "file": "http://content.jwplatform.com/videos/tNGbzoVc-F67Awtrj.mp4",
                            }],
                            "tracks": [{
                                "file": "https://content.jwplatform.com/tracks/YFoEjMQx.vtt",
                                "label": "English",
                                "kind": "captions"
                            }]
                        }],
                        "captions": {
                            "color": "FE94AB",
                            "backgroundColor": "000000",
                            "backgroundOpacity": 100,
                            "fontSize": 8
                        },
                        "autostart": false,
                        "controls": true,
                        "primary": "flash",
                        "aspectratio": "16:9"
                    });

        /*
                    playerInstance.on('ready', function () {
                        $('#status').html("JW7. Provider name: " + playerInstance.getProvider().name);
                    });
        */                 
                    playerInstance.on('captionsList', function (t) {
                       console.log(t)
                    });
                    });
            </script>           
        </div>          
    </div>
</div>      

我想让这个响应。我有

    <div class="videoWrapper">
            <div id="media_player"></div>

通常会处理它,但因为id =“media_player”强制玩家有一个大小我无法解决这个问题。有没有人知道如何实现回应?

欢呼声

1 个答案:

答案 0 :(得分:1)

在你的CSS中添加:

PersonService