question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SOLVED: m3u8 streaming not working after build

See original GitHub issue

Hi

It works perfectly when i am running: yarn dev, but when i build it, it won’t work. Hope you guys can see what i do wrong, thanks in advance

console log on builded version screen shot 2018-01-29 at 13 56 30

Versions:

"videojs-contrib-hls": "^5.12.2",
"vue": "^2.3.3",
"vue-video-player": "^5.0.1"

Build script from package.json

"build:mac": "node .electron-vue/build.js && electron-builder -m",

wepback.main.config.js

  module: {
    noParse: [/videojs-contrib-hls/],

video.vue screen shot 2018-01-29 at 13 52 21

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
silocommented, Feb 1, 2018
1reaction
silocommented, Oct 27, 2018

@Jayant-Purohit i have installed these packages:

“videojs-contrib-hls”: “^5.12.2”, “vue-video-player”: “^5.0.1”, <-- i don’t think this is involved in the solution

in my Video.vue file:

<script>
import videojs from 'video.js'
window.videojs = videojs
require('videojs-contrib-hls/dist/videojs-contrib-hls.js')

export default {
  name: 'VideoPage',
  data () {
    return {
      selected: '',
      tvList: {
        'TV 2': 'http://tv2danmark-tv2nord-live.hls.adaptive.level3.net/tv2danmark/tv2nord/master3200kbps.m3u8',
        'Folketinget': 'http://httpcache1.dna.qbrick.com/90042-httpcache2/smil:FT_stream_high/playlist.m3u8'
      },
      playerOptions: {
        autoplay: false,
        fluid: true,
        preload: 'auto',
        sources: [{
          withCredentials: false,
          type: 'application/x-mpegURL',
          src: this.tvUrl
        }],
        controlBar: {
          timeDivider: false,
          durationDisplay: false
        },
        flash: {hls: { withCredentials: false }},
        html5: {hls: { withCredentials: true }}
      }
    }
  },
  methods: {
    playerReadied (player) {
      var hls = player.tech({ IWillNotUseThisInPlugins: false }).hls
      console.log(hls)
      player.tech_.hls.xhr.beforeRequest = function (options) {
        // console.log(options)
        return options
      }
    },
    onChange () {
      console.log(this.selectedTv)
      this.src = this.selectedTv
    }
  },
  beforeCreate: function () {
    this.tvUrl = 'http://tv2danmark-tv2nord-live.hls.adaptive.level3.net/tv2danmark/tv2nord/master3200kbps.m3u8'
  }
}
</script>

I hope this helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

SOLVED: m3u8 streaming not working after build #143 - GitHub
Hi It works perfectly when i am running: yarn dev, but when i build it, it won't work. Hope you guys can see...
Read more >
Cannot Load Video Error M3U8 In Windows 10/8/7 ... - YouTube
Fix : Cannot Load Video Error M3U8 In Windows 10/8/7 and Google Chrome [Tutorial]The “Cannot Load M3U8 ″ Error can occur while trying...
Read more >
Playing m3u8 Files with HTML Video Tag - Stack Overflow
Stream HLS or m3u8 files using above code. it works for desktop: ms edge browser (not working with desktop chrome) and mobile: chrome,opera...
Read more >
Live m3u8 file not playing - Roku Community
Our live stream suddenly stopped playing yesterday. When I click "play" it goes to load, but then very quickly stops and goes back....
Read more >
How to Troubleshoot Your HLS Live Stream - Dacast
Streaming is easier than ever, but problems can still arise. This blog presents a logical process for troubleshooting an HLS live stream.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found