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.

How to get networkError details while loading hls stream

See original GitHub issue

While loading a hls stream to the player, sometimes wowza stream returns 403. I tried subscribing to error event but it doesn’t throw any event. How do I intercept network errors returned by wowza.

this.vgAPI.getDefaultMedia()
            .subscriptions
            .error
            .subscribe( (error) => {
            console.log(error);
        });

I checked out hls.js docs, it contains events for network errors https://github.com/video-dev/hls.js/blob/master/docs/API.md#fifth-step-error-handling

Based on this i tried to edit node_modules/videogular2/src/streaming/vg-hls.js and added an networkError check which seems to fire every time wowza returns an error.

// It's a HLS source
        if (this.vgHls && this.vgHls.indexOf('.m3u8') > -1 && Hls.isSupported()) {
            var video = this.ref.nativeElement;
            this.hls = new Hls(this.config);
            this.hls.loadSource(this.vgHls);
            this.hls.attachMedia(video);
            // Error Checking
            this.hls.on(Hls.Events.ERROR, function (event, data) {
                if ( data.type === 'networkError') {
                    console.log('network error encountered');
                }
            });
        }

Is there any event which handles http Error in vgAPI or how can we bind hls.js error events with videogular2 events. Sorry, if i missed out something already mentioned in the docs for this. Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
CuriousDolphincommented, Jun 10, 2018

Sorry if i up this issues,but for bypass https://github.com/videogular/videogular2/issues/726 (when there are errors in hls stream, buffer ring doesnt vanish and error in promise in console )

I try to add

@ViewChild(VgHLS) vgHls: VgHLS;


this.vgHls.hls.on(Hls.Events.ERROR, () =>  {
            console.log('error');
     }); 

but i’ve got

ERROR TypeError: Cannot read property 'on' of undefined
    at StreamingPlayerComponent.push../src/app/streaming-player/streaming-player.component.ts.StreamingPlayerComponent.onPlayerReady
0reactions
l-hwencommented, Nov 23, 2019

I also have this problem. this.vgHls.hls is undefined.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Troubleshoot Your HLS Live Stream - Dacast
Right-click anywhere on the page, then click “view page source“. Search for the code in your browser using Ctrl+F on a PC or...
Read more >
7 Ways to fix hls.js Error in Chrome & Other Browsers
How can I fix hls.js network error in Chrome? · 1. Turn off firewalls temporarily · 2. Disable the Proxy Server · 3....
Read more >
StreamSpot HLS Manifest Errors - Support
If you are receiving an HLS Failed to pull Manifest error, HLS Failed to load stream, or similar errors here are a few...
Read more >
Unable to play the HLS stream. Player Error "Manifest is not a ...
This article will help you to check the playback failure if the playlist is not formatted properly.
Read more >
CF Stream HLS and DASH Returning Error not playing
Hello, I am trying to play HLS /or DASH in a thrid party video player with no success. I get Network error every...
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