videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

Catch 403 #141

Open ghost opened 6 years ago

ghost commented 6 years ago

morangil commented on Oct 31, 2017, 8:13 AM UTC:

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

This issue was moved by forbesjo from videojs/videojs-contrib-hls#1287.

ghost commented 6 years ago

barhom commented on Nov 23, 2017, 10:40 AM UTC:

+1

ghost commented 6 years ago

squarebracket commented on Nov 27, 2017, 10:42 PM UTC:

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

ghost commented 6 years ago

barhom commented on Dec 1, 2017, 9:14 AM UTC:

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")
ghost commented 6 years ago

morangil commented on Dec 14, 2017, 4:56 PM UTC:

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.

ghost commented 6 years ago

nicolaslevy commented on May 31, 2018, 6:49 PM UTC:

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?