javascript - Access video.js runtime properties in safari -


i trying print runtime properties of video.js player in safari hlsproperty not coming. getting error saying hls not defined.

player.html

<body>    <script src="http://vjs.zencdn.net/5.6.0/video.js"></script>    <script src="videojs.hls.min.js"></script>      <video id="my-video" class="video-js" controls preload="auto" width="640" height="264" data-setup="{}">      <source src="http://manifest.us-west-2.qa2.boltdns.net/manifest/v1/hls/v4/clear/test/ddebe1d2-8285-46d6-9853-6bbc9f51616a/10s/master.m3u8?fastly_token=ntzkmda5zwrfngi4ndyymge0yzzlodqyndq5owi3ntdjnwi3nzq5m2jkn2iynjmxzdnhmwyzotdlztkwogu2zdflntk4yjqwyg%3d%3d"               type="application/vnd.apple.mpegurl">      <p class="vjs-no-js">        view video please enable javascript, , consider upgrading web browser        <a href="http://videojs.com/html5-video-support/" target="_blank">supports html5 video</a>      </p>    </video>    <script>  var player = videojs('my-video', {    hls: {      withcredentials: true    }  });    player.play();    var bandwidth = player.hls.bandwidth;   alert("bandwidth" + bandwidth.tostring());  </script>    </body>

i not getting why hls not defined while getting hls on chrome , firefox.

here error getting in safari console:enter image description here

is there other way runtime properties.

unfortunately, there no way control rendition switching on hls safari because hls done natively , safari (quicktime in fact) not expose api that. have trust browser show best possible quality.

more on on apple's docs , on github thread


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -