I am able to play the m3u8 files in the PC and android devices, but i am not able to play those files in the iOS mobile devices and safari browser, I disabled the overrideNative to 'true' for the android devices, so its working in the android. but we should not disable the native for iOS and safari, because iOS Safari uses a native player, so I have set the overridnative false for the iOS. but its not working. I am following new videojs versions.
videojs : 6.4.0
videojs contrib hls: 5.12.2
videojs flash: 2.0.1
Example
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls</title>
<link href="https://unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/video.js"></script>
<script src="https://unpkg.com/[email protected]/dist/videojs-flash.js"></script>
<script src="https://unpkg.com/[email protected]/dist/videojs-contrib-hls.js"></script>
</head>
<body>
<h1>Video.js Example Embed</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="600" height="268"
data-setup='{}'>
<source src="https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8" type="application/x-mpegURL">
</video>
<script>
let videojshls= videojs('my_video_1', { html5: {
nativeAudioTracks: false,
nativeVideoTracks: false,
hls: {
debug: true,
overrideNative: false
}
}});
</script>
</body>
</html>
example jsfiddle
please can anyone help me. thanks
Try this http://jsfiddle.net/fxfktztx/1/. It works for me.
var overrideNative = false;
var player = videojs('example-video', {
html5: {
hls: {
overrideNative: overrideNative
},
nativeVideoTracks: !overrideNative,
nativeAudioTracks: !overrideNative,
nativeTextTracks: !overrideNative
}
});
player.play();
As far I know, videojs options should be passed when the player is initialised, either with data-setup
attribute or directly into the constructor as I did in the example above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With