Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Catch 403 #1287

Closed
morangil opened this issue Oct 31, 2017 · 6 comments
Closed

Catch 403 #1287

morangil opened this issue Oct 31, 2017 · 6 comments

Comments

@morangil
Copy link

morangil commented Oct 31, 2017

I'm using tokens on my site to play mp4.
Is there a way to catch 403 incase of expired token?

@morangil morangil changed the title Catch 404 Catch 403 Nov 1, 2017
@barhom
Copy link

barhom commented Nov 23, 2017

+1

@squarebracket
Copy link
Contributor

I'm not sure what you're asking for here. Does the token expire while the stream is playing?

@barhom
Copy link

barhom commented Dec 1, 2017

Lets assume the following;

  1. You are playing a live stream
  2. Whilst fetching the playlist after playback time of X minutes you suddenly get a 40x/50x.
  3. We want to catch that 40x/50x and then do whatever we want. For example, reload the video, maybe play another video, or simply outputting to console.log("40x/50x happened")

@morangil
Copy link
Author

@squarebracket,

correct. let's say the token is set to 10 minutes but someone clicked on pause for 12 minutes and try to watch the movie.

@nicolaslevy
Copy link

I need this feature too.

Maybe i'm looking at the wrong place but the only thing that worked for me was listen to 'retryplayist' events. Something like this:

  player.tech_.on('retryplaylist', () => {
      do_something()
  })

Does anyone has a better solution?

@ghost ghost deleted a comment from forbesjo Jul 2, 2018
@ghost
Copy link

ghost commented Jul 2, 2018

This issue was moved by forbesjo to videojs/http-streaming#141.

@ghost ghost closed this as completed Jul 2, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants