Giter VIP home page Giter VIP logo

http-streaming's Issues

Seek to last playlist mediaIndex

Description

The player starts playing a playlist with 0 index, but it is quickly deleted by the server. How can I start playing from the last playlist index?

In my case, you need to play with odminn23_1-408.ts, but playing with odminn23_1-404.ts

generateSegmentInfo_(){
    ...
    playlist.segments[mediaIndex]; //current 0, need 4
    ...
}

Sources

The playlist:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:404
#EXT-X-TARGETDURATION:13
#EXTINF:12.500,
odminn23_1-404.ts
#EXTINF:12.500,
odminn23_1-405.ts
#EXTINF:12.500,
odminn23_1-406.ts
#EXTINF:12.500,
odminn23_1-407.ts
#EXTINF:12.500,
odminn23_1-408.ts

Start project

Tasks

  • get videojs-contrib-hls in a good state
  • push videojs-contrib-hls to vhs master
  • indicate in changelog that this is videojs-contrib-hls version x.y.z
  • update README
  • reset version to 0.1.0
  • publish to npm under @videojs/http-streaming
  • begin new work

CueStart and CueDuration does not sync up with the Cue Out and Duration time with m3u8 file

Description

I have been able to get the textTracks using a modified program. I am expecting my Cue to load at 48 secs for 12 secs and then at 78 secs for 20 secs. I am instead getting VTT Cues at 40 secs for 40 secs duration. I am not sure how this cue start and duration are picked up from.## Sources
Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.

I am including the link to my code, logs and the m3u8 file.
https://gist.github.com/varadarajana/9c0cd051b646a4f70a869a65143305be

Steps to reproduce

  1. Just by playing the Demoplayer with names Video fragments as specified in m3h8 file we will be able to reproduce this issue.

How to catch segment/playlist errors

Description

Most of our streams come from local small business DVRs and aren't very reliable. I've tried using the hls-timestamp-offset event for error recovery with limited success. Is there a way to catch segment or playlist errors? If not, would it be possible for you to add an event or the ability to specify an error function to videojs.Hls.xhr?

Sources

Sorry, my sources are private.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Load a video stream from an unstable source.
  2. Wait for it to error.

Results

Expected

The player continues to try and load the stream.

Error output

If there are any errors in the console, from the player, or anywhere else please include them here:

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
5.14.1

videojs version

what version of videojs does this occur with?
6.8.0

Browsers

what browsers are affected? please include browser and version for each

  • Waterfox 56.0.4.1
  • Chrome 65.0.3325.181

Platforms

what platforms are affected? please include operating system and version or device and version for each

  • Windows 7
  • Windows 10

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.

  • videojs-errors 3.1.0

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

  • jQuery 3.3.1
  • Angular 1.6.2

While doing HLS AES 128 playback, the player request key file for every chunk.

Description

I have the same question as this post:
videojs/videojs-contrib-hls#776

I want to control the key file request by php server script that only the valid user can get the AES key file. so I can not set cache expires of the key file.Therefor the php server been to very hevy. I had tried to modify mediaSegmentRequest function for check key.resovledUri and store the key value,but failed.
Is there any other way to fixed the proplem?
Thanks a lot!

videojs-contrib-hls version

videojs-contrib-hls 5.5.3

videojs version

video.js 5.19

"Media could not be loaded"

Hi all, quick question that my lack of experience may be the cause of the problem.

Sometimes I get a "Media could not be loaded" error, which is weird because as soon as it is reloaded it works fine.

screen shot 2018-06-08 at 11 39 14

How can I catch this error and reload programmatically?

Some m3u8 videos are stuck when played repeatedly after the first time

Description

I find my m3u8 videos are stuck when played repeatedly, but they play normal for the first time!
I tried playing video with safari and firefox, but did not discover this problem. Only have problems in chrome!
I tried playing video on ipone7's safari with native video tag,but did not discover this problem.

Sources

experiment URL : http://videojs.github.io/videojs-contrib-hls/
experiment source: http://n1-q.mafengwo.net/s11/M00/D4/FE/wKgBEFrQXCmAOPHmAAAB4fZtONI06.m3u8

Browsers

chrome 65.0.3325.181

If only `#EXT-X-ENDLIST` is added to a playlist, the update isn't seen

Description

I saw an issue where intermittently it would not recognize that a live stream had ended, it would stall on the last frame and show the loading indicator, but not progress further. In the console you would see multiple instances of this message, and it would keep re-requesting the m3u8 file periodically.

video.js:498 VIDEOJS: WARN: Problem encountered with the current HLS playlist. Trying again since it is the final playlist.
video.js:498 VIDEOJS: WARN: Problem encountered with the current HLS playlist. Trying again since it is the final playlist.
video.js:498 VIDEOJS: WARN: Problem encountered with the current HLS playlist. Trying again since it is the final playlist.

Sources

Sorry, I don't have a public source to share.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

This is a test that only updates the endList property when calling updateMaster. On the current head of master it will fail.

  1. Add this test to tests/playlist-loader.test.js
QUnit.test('updateMaster updates master when endList changes', function(assert) {
  const playlist = {
    endList: false,
    mediaSequence: 0,
    attributes: {
      BANDWIDTH: 9
    },
    uri: 'playlist-0-uri',
    resolvedUri: urlTo('playlist-0-uri'),
    segments: [{
      duration: 10,
      uri: 'segment-0-uri',
      resolvedUri: urlTo('segment-0-uri')
    }]
  };

  const master = {
    playlists: [playlist]
  };

  const media = Object.assign({}, playlist, {
    endList: true
  });

  assert.deepEqual(
    updateMaster(master, media),
    {
      playlists: [{
        endList: true,
        mediaSequence: 0,
        attributes: {
          BANDWIDTH: 9
        },
        uri: 'playlist-0-uri',
        resolvedUri: urlTo('playlist-0-uri'),
        segments: [{
          duration: 10,
          uri: 'segment-0-uri',
          resolvedUri: urlTo('segment-0-uri')
        }]
      }]
    },
    'updates master when endList changes');
});
  1. Run tests

Results

Expected

Playlist should update when endList changes

Error output

You will see this message repeated in the console when this happens

video.js:498 VIDEOJS: WARN: Problem encountered with the current HLS playlist. Trying again since it is the final playlist.

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls x.y.z

videojs version

what version of videojs does this occur with?
video.js 5.14.1
video.js 7.0.0 as well (still in https://github.com/videojs/http-streaming/blob/master/src/playlist-loader.js#L97)

Browsers

what browsers are affected? please include browser and version for each
All

Platforms

what platforms are affected? please include operating system and version or device and version for each
All

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
No

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.
No

Playback Error in Microsoft Edge. Media playback was aborted due to a corruption....

Description

Briefly describe the issue.

I'm getting a error message, only in Microsoft Edge, that states.

The media playback was aborted due to a corruption problem or because the media used features your browser did not support.

This message only seems to appear when a new segment is trying to be loaded. So it takes about 2 1/2 - 3 minutes before it will appear. I'm running Edge v16 which according to the support chart supports mp4 fragments.

Here is an example. It does the same thing in JSBin. Once again note this only happens in Microsoft Edge.
http://jsbin.com/natudaw/1/edit?html,output

Sources

This happens with all the videos in Edge. I don't see this issue at all in any of the other browsers except IE 11 which obviously doesn't support HLS.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Navigate to Sample
  2. Play Video
  3. Wait 3 minutes max

Results

Expected

The video to continue to play without error

Error output

The media playback was aborted due to a corruption problem or because the media used features your browser did not support.

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls v5.14.0

videojs version

what version of videojs does this occur with?
video.js 6.6.3

Browsers

what browsers are affected? please include browser and version for each
*Microsoft Edge

Platforms

what platforms are affected? please include operating system and version or device and version for each
*Windows 10

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.

  • No

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

  • Yes, but it is irrelevant since the same issue shows up in the JSBin sample.

Support alternative video tracks [RFC8216 (Section 4.3.4.2.1)]

Description

Sources

I do not have a webhost I could use to the demo files I am currently using. The demo I am using with just 4 camera angles (will be 9 soon) already takes up 1.46 GB.

I might create a very simple test I could host on GitHub Pages if needed.

Copied below is my test files: (Independent testing via VLC and MPV show that the video tracks appear and can be switched to.)

test.html

<head>
  <link href="http://vjs.zencdn.net/6.4.0/video-js.css" rel="stylesheet">

  <!-- IE8 Support -->
  <script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>

  <script src="http://vjs.zencdn.net/6.4.0/video.js"></script>
  <script src="https://unpkg.com/videojs-flash/dist/videojs-flash.js"></script>
  <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
  <script>
    var player = videojs('my-video');
    player.play();
  </script>
</head>

<body>
  <video id="my-video" class="video-js" controls preload="auto" width="1280" height="720" data-setup="{}">
    <source src="multicam.m3u8" type='application/x-mpegURL'>
    <p class="vjs-no-js">
      To view this video please enable JavaScript, and consider upgrading to a web browser that
      <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
    </p>
  </video>
</body>

multicam.m3u8

#EXTM3U
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="main",NAME="Auto Cam", DEFAULT=YES,URI="auto-cam/index.m3u8"
#EXT-X-MEDIA:TYPE=VIDEO,GROUP-ID="main",NAME="Director", DEFAULT=NO,URI="director/index.m3u8"

#EXT-X-STREAM-INF:BANDWIDTH=12163000,CODECS="mp4a.40.2,avc1.4d401e",VIDEO="main"
auto-cam/index.m3u8

auto-cam/index.m3u8 (First 10 segments of many).

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:13
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:11.973222,
auto-cam-000.ts
#EXTINF:8.450000,
auto-cam-001.ts
#EXTINF:12.500000,
auto-cam-002.ts
#EXTINF:8.333333,
auto-cam-003.ts
#EXTINF:12.500000,
auto-cam-004.ts
#EXTINF:8.333333,
auto-cam-005.ts
#EXTINF:8.333333,
auto-cam-006.ts
#EXTINF:12.500000,
auto-cam-007.ts
#EXTINF:7.266667,
auto-cam-008.ts
#EXTINF:12.500000,
auto-cam-009.ts
#EXTINF:11.300000,
auto-cam-010.ts

director/index.m3u8 is formated the same as auto-cam/index.m3u8.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Create a m3u8 playlist with alternative video tracks
  2. Play using video.js with video-contrib-hls.js

Results

Expected

I should be able to see and select the video tracks and audio tracks on screen.

Error output

None

Additional Information

videojs-contrib-hls version

  • videojs-contrib-hls 5.12.0

videojs version

  • video.js 6.4.0

Browsers

Tested on:

  • Chrome (63.0.3239.84)
  • Firefox (58.0b10)
  • Edge (Latest)
  • iOS Safari (11.2)

Seems to be all browsers.

Platforms

  • Tested on Windows and iOS

Other Plugins

  • videojs-ie8
  • videojs-flash

Problem with Android Chrome

Description

I hava a file video.m3u8 which contained some .ts file url, and I save the video.m3u8 as video without file name extension.

I used this code <source src="/video/video" type="application/x-mpegURL"> to play HLS video,
It worked successfully on Chorme desktop, but not on Android Chrome.

When I turned video back to video.m3u8 and add .m3u8 to source tag's src like <source src="/video/video.m3u8" type="application/x-mpegURL">, it worked fine on both desktop and Android Chrome.

In order to find what went wrong, I used Google Chrome Remote Debug to remote observe on Android Chrome console. There is no error log. Does anyone knows why?

Sources

Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.

<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <title>Test</title>
      <link href="http://vjs.zencdn.net/6.2.8/video-js.css" rel="stylesheet">
   </head>
   <body>
      <video id="player" class="video-js vjs-default-skin" controls preload>
         <!-- <source src="/video/video.m3u8" type="application/x-mpegURL"> -->
         <source src="/video/video" type="application/x-mpegURL">
      </video>
      <script src="http://vjs.zencdn.net/6.2.8/video.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.12.2/videojs-contrib-hls.min.js"></script>
      <script>
          var player = videojs('player');
          player.play();
     </script>
   </body>
</html>

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls 5.12.2

videojs version

what version of videojs does this occur with?
video.js 6.2.8

Browsers

what browsers are affected? please include browser and version for each

  • Android Chrome 62.0.3202.84 (not working)
  • Mac Chrome 62.0.3202.94 (working)

Platforms

what platforms are affected? please include operating system and version or device and version for each

  • Android 7.0
  • Mac 10.12.6

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
*

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.
*

Connection Refused errors are handled poorly

Description

If the media server goes down while a stream is playing, the screen will freeze when the buffer runs out, but no buffering spinner will be displayed. In the case of a live stream, contrib-hls will keep trying to download the playlist. In the case of a VOD stream, it will keep trying to download the last TS file.

Sources

Should work with any source?

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Start playing an HLS stream.
  2. Bring down the server that's serving the media.
  3. Watch the result.

Results

Expected

Buffering animation occurs immediately after the buffer is exhausted. Additionally, maybe an error should be thrown after a configurable amount of time stalled with no download progress or a number of failed XHRs.

Error output

A constant output of net::ERR_CONNECTION_REFUSED and the warning:
VIDEOJS: WARN: Problem encountered with the current HLS playlist. Trying again since it is the final playlist.

Additional Information

videojs-contrib-hls version

videojs-contrib-hls 5.12.2

videojs version

video.js 6.4.0

Browsers/Platforms

  • Linux/Chrome 62
  • macOS/Chrome 62
  • macOS/Safari 11.0.1
  • Windows/Chrome 62
  • Windows/IE11

Other JavaScript

Just using the hosted test player at http://videojs.github.io/videojs-contrib-hls/

add coveralls for coverage tracking

Sync up with video.js's build processes, use coveralls for code coverage, add a badge showing the coverage and perhaps add a PR hook indicating coverage percentage change.

Request to allow promises for Hls.xhr.beforeRequest

Description

I am requesting for beforeRequest to allow promises to be used within the function. The reason why I am requesting this functionality is because I am using service call to update the uri value.
I need to update the uri this way because I am using NGINX’s secure_link module along with WOWZA. The secure link module requires all paths to be hashed by the client for authorization to view the video. I am using a service to generate the hash which is where my issue stems from.
I have tried using fetch api to make my requests, but beforeRequest continues to update the uri with the Promised fetch request that has not yet been fulfilled. Making the fetch call synchronous via async/await also has the same issue.
The solution to resolve this issue was by making a synchronous XMLHttpRequest for my request, but this is a short term solution because XMLHttpRequest is being deprecated.
I would like to help with this effort if possible, but I am unsure of where to start.

Sources

Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

Override the function Hls.xhr.beforeRequest. Set the options.uri equal to a value that is fetched from a service.
Example:

window[`videojs`].Hls.xhr.beforeRequest =  function (options) {        
                                  
                //set the uri to a value that is retrieved from a service
                //fetchRequest makes a service call via fetch that returns a full uri
                options.uri = fetchRequest(path);
                
                return options;
            }

Results

Options updates in videojs before the promise is fulfilled causing the uri to be null.

Expected

Please describe what you expected to happen that did not happen in the description.
Videojs should update the uri after the promise is fulfilled

Error output

If there are any errors in the console, from the player, or anywhere else please include them here:

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls 5.12.2

videojs version

what version of videojs does this occur with?
video.js 6.6.3

Browsers

what browsers are affected? please include browser and version for each
*Google Chrome: Version 64.0.3282.186

Platforms

what platforms are affected? please include operating system and version or device and version for each
*

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
*

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.
*fetch

Demo with Firefox: Specified “type” attribute of “application/x-mpegURL” is not supported.

I do not want to annoy you, so sorry for posting this here besides the one in the other repo - but I do not understand why the demo page gives me that console output:

Specified “type” attribute of “application/x-mpegURL” is not supported. Load of media resource //d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8 failed. All candidate resources failed to load. Media load paused. All candidate resources failed to load. Media load paused.
This is with Firefox 59 on Ubuntu. i have seen this error on OSX, too.

Ah, yes, sorry, i should add that the video plays, but the console message is annoying. Also I just do not understand why that happens I would like to learn about that. Thanks!

Cannot read property 'segments' of undefined

Description

Similar with this issue,some m3u8 source cannot play and throw an error,but it work in VLC and mobile browser.

Sources

I download a little part of source and make a test demo, please check the attachment
hls.zip

Expected

Confirm why the source cannot play,is it unspported by this plugin,or lack of something necessary?

Error output

Uncaught TypeError: Cannot read property 'segments' of undefined

videojs-contrib-hls version

videojs-contrib-hls 5.10.1

videojs version

video.js 6.2.5

Browsers

*Chrome 59.0.3071.115

Platforms

*Windows 10

CODE:3 MEDIA_ERR_DECODE on Mac Safari

Hello there,

I'm using VideoJS and videojs-contrib-hls without setting overrideNative to true on Mac Safari with a streaming URL of a live broadcast.

I got the following error:

[Error] VIDEOJS: (4)
“ERROR:”
“(CODE:3 MEDIA_ERR_DECODE)”
“The media playback was aborted due to a corruption problem or because the media used features your browser did not support.”
MediaError {code: 3, message: “The media playback was aborted due to a corruption…media used features your browser did not support.“, status: null, MEDIA_ERR_CUSTOM: 0, MEDIA_ERR_ABORTED: 1, …}
    logByType (video.js:498)
    error (video.js:620)
    error (video.js:23829)
    handleTechError_ (video.js:22449)
    bound (video.js:2348)
    bound (video.js:2348)
    dispatcher (video.js:1971)

Surprisingly, the error disappeared and the video continued playing after a while.

Any thoughts?
What does this error refer to? Is there a problem with the streaming URL?

videojs-contrib-hls version

5.13.0

videojs version

6.7.4

Browsers

Safari

Platforms

macOS

Thanks.

cause of Cannot read property 'segments' of undefined

Description

Briefly describe the issue.
some m3u8 can not play and console print "Cannot read property 'segments' of undefined "
if your PAT of ts have NIT ,it will cause videojs-contrib-hls analysis PMT failed。

Sources

15102: parseType(data.subarray(i + 4, i + 8));

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.
Sample PAT :
47 40 00 14 00 00 B0 11 00 00 C1 00 00 00 00 E0 1F 00 01 E1 00 23 5A AB 82
| NIT | PMT | CRC |

Results

Expected

console print :Cannot read property 'segments' of undefined

Error output

If there are any errors in the console, from the player, or anywhere else please include them here:

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?

videojs version

what version of videojs does this occur with?
Video.js 6.4.0

Browsers

what browsers are affected? please include browser and version for each
*
chorme

Platforms

what platforms are affected? please include operating system and version or device and version for each
*

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.
*

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.
*

Momentary loss of connection makes player stop working with encrypted hls

Description

I've already discussed about this issue on videojs/videojs-contrib-hls#1030 and at the time we agreed to fix this using blacklists. However, when using an encrypted hls stream the problem still remains.
After some debugging I found out that it might be happening when the connection breaks while downloading the encryption key.
The behavior for retrying a new segment is bound to the progress event, however, this event is bound just to the segmentXhr request and not to the keyXhr request.

One way that I found that could fix it is to bind this event to the key request as well.

See media-segment-request.js

const keyRequestCallback = handleKeyResponse(segment, finishProcessingFn);
const keyXhr = xhr(keyRequestOptions, keyRequestCallback);
//Probable solution
keyXhr.addEventListener('progress', handleProgress(segment, progressFn));
activeXhrs.push(keyXhr); 

Since I don't know the code this well I'm not confident to say that this would be the right solution for the problem.

Could anybody help?

Sources

Use this m3u8 file:
https://s3.amazonaws.com/player.hotmart.dev/video/lYq2j96qaG/hls/master.m3u8

Steps to reproduce

  1. Go to videjs hls demo page and click play
  2. After some time (like 5 seconds), go to chromes developer tools, network and make it offline.
  3. When it try to load new segments you'll be able to see some warnings on the console and that it keeps trying to download new segments from time to time. When the connection returns (toggle offline off) it will start playing again.
  4. Repeat the steps above using the source url informed. A connection error will be thrown but it won't retry to download segments anymore. Even when the connection returns nothing will happen

videojs-contrib-hls version

videojs-contrib-hls 5.14.1 (Using the demo page)

videojs version

what version of videojs does this occur with?
video.js 6.7.3 (Using the demo page)

Browsers

Tested on chrome but I'm pretty sure it happens on all browsers

Uncaught exception at 'addSourceBuffer' when changing source or disposing/re-creating video

Description

In our scenario, we need to dynamically create a video, change its source several times within few seconds (user will be previewing videos), and dispose and re-create it at some point.

Using our video source files, when in the middle of a video, we change the video source through videojs().src function, an Uncaught DOMException: Failed to execute 'addSourceBuffer' on 'MediaSource': This MediaSource has reached the limit of SourceBuffer objects it can handle. is received.

Here is a reduced test case on jsbin:
http://jsbin.com/tojewagula/edit?html,console,output

Here are the source files you can download and check (npm install and npm start should be enough):
https://drive.google.com/file/d/0B-Ny3L4qtHdUXzRaZlltWjF0YXM/view?usp=sharing

Here are some example M3U8 URLs we are using:
https://scdn.golden-race.net/hlsvideos/dog6/d6-5-4-3-1437.m3u8?st=JMUY2EVWtAHdK-GDFcNyMw&e=1485420418
https://scdn.golden-race.net/hlsvideos/sp/s4-4-3-054.m3u8?st=BvMPTBAMEamHQICmFvEoJg&e=1485424078
https://scdn.golden-race.net/hlsvideos/mt/mt-5-4-1-0229.m3u8?st=yYu5J6ml4wkTdgSrbAkY9Q&e=1485424498

Sources

We realized that inserting a debug point in the function createRealSourceBuffers_() provoked that this exception is never thrown, so we just inserted a simple wait of just before the buffer is created with _this2.mediaSource_.nativeMediaSource_.addSourceBuffer(...), and it's working almost all the times (we still get the exception sometimes on extreme conditions).

Steps to reproduce

Using the given jsbin example:

  1. Choose one of our URLs, paste it in the text input, and press Load. In the browser console you can check that the video is created with the given url and it starts playing.
  2. After waiting a couple of seconds, press Load again with the same video or choose a different one (may have to do that several times until the error is found).
  3. Encounter the error.

Note: Can be also discovered even though video is disposed.

Results

Expected

Video should be working correctly, even though is Loaded several times and/or disposed.

Error output

An unexpected error is found and video looses sound.

Additional Information

We were're NOT able to reproduce this issue with a couple of example videos found on the internet ( e.g. https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8 ), but trying to figure out what were the differences between both videos, we found that they're almost the same: same enconding, videos with different resolutions and several audio streams... It's driving us crazy!

videojs-contrib-hls version

videojs-contrib-hls 4.1.0

videojs version

video.js 5.15.1

Browsers

All

Platforms

All

Other Plugins

No other plugins are being used.

Other JavaScript

jQuery 1.8.0

Support highbitrate/4K content on MSE browsers like Firefox

Description

Unable to play HLS stream while segment size > 20MB

Sources

Any m3u8 playlist with fi (usally 1080p streams)

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Navigate to demo player
  2. Play the video source

Results

Expected

Video can be played

Error output

VIDEOJS: ERROR: (CODE:-3 undefined) The quota has been exceeded.
Object { code: -3, type: "APPEND_BUFFER_ERR", message: "The quota has been exceeded.", originalError: DOMException }
video.js:129:5

videojs-contrib-hls version

latest

videojs version

latest

Browsers

Firefox

webpack import videojs-contrib-hls will not register hls source handler for html5 tech, that cause media_err_src_not_supported

Description

  1. When i use webpack to bundle videojs and contrib-hls, the video-contrib-hls will not register sourceHandlers of "Html5" tech. So, if i try to play m3u8 video in chrome, the console will printed out:
    "
    VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media
    "
  2. If i use videojs and videojs-contrib-hls with a tag in html, the contrib-hls will register sourceHandlers of "Html5" tech right. Everything works fine.

Sources

`_Tech.selectSourceHandler = function (source, options) {
var handlers = _Tech.sourceHandlers || [];
var can = void 0;

for (var i = 0; i < handlers.length; i++) {
  can = handlers[i].canHandleSource(source, options);

  if (can) {
    return handlers[i];
  }
}`

in above code of video.js, i found there is only ONE default sourceHandlers for “html5” tech, no HLS source handler registered. If i use webpack manner:
import 'video.js/dist/video-js.css' import videojs from 'video.js' window.videojs = videojs // hls plugin for videojs6 require('videojs-contrib-hls/dist/videojs-contrib-hls.js')
but if i use normal cdn script tag manner, everything works fine, and there are TWO source handler, one of which is the HLS source handler.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. use webpack bundle including video.js and video.contrib-hls
  2. play a m3p8 using video.js

Results

There will be following error in console:
'
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media
'

Expected

Works well , it should be the same as in CDN script tag manner.

Error output

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) No compatible source was found for this media

Additional Information

Please include any additional information necessary here. Including the following:

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls 5.14.1

videojs version

what version of videojs does this occur with?
video.js 6.7.3

Browsers

what browsers are affected? please include browser and version for each
chrome 63.0.3239.132 , firefox not work
Edge works well

Platforms

what platforms are affected? please include operating system and version or device and version for each
I am testing in windows 10 64 bit

How to encrypt the m3u8 video, ask key to encrypt the encrypted string, and how to decrypt the player

Description

In dealing with m3u8 encrypted video, when requesting key, return the corresponding key string.Videojs-contrib-hls to get the string for ArrayBuffer processing, and I can't find the source code matching in the source code. The current scenario is that the key interface obtains an encrypted key string through the algorithm defined by the front and back ends, but this string is not plaintext. After videojs-contrib-hls gets it, it cannot match. I need to modify the source code and unlock the encrypted key. Identify the videojs-contrib-hls. How can I do it, please? How to modify the source code?

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Replaced the old Node.js version in your .nvmrc with the new one

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Seeking to a time just before a segment finishes causes buffer underrun

Description

When seeking to a time just before the end of a segment, that segment will be downloaded, and playback will start. of course, once the seek to the end of the segment happens, the buffer is exhuasted, and thus you get a playback stall while it buffers up the next segment.

Sources

I've only really tested on streams with 6s segments. I'm not sure if the buffering is time-based; if the segments are smaller, it's possible enough would be buffered before playback.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

All you need to do is seek to just before a segment end that isn't buffered.

Results

Expected

The player buffers the following segment before starting playback

Error output

Additional Information

videojs-contrib-hls version

videojs-contrib-hls 5.10.0

videojs version

video.js 6.2.6

Browsers

All?

Platforms

All?

Other Plugins

  • videojs-contrib-dash
  • videojs-contrib-eme
  • videojs-contrib-quality-levels
  • videojs-airplay

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

  • bootstrap
  • jquery
  • some custom-written javascript for hotkey binding

Not able to intercept/modify the index.m3u8 file requests in Safari

Description

I'm trying to intercept/modify the index.m3u8 file requests, for some application-specific purpose, using one of the following possible methods:

  • update the 'resolveUrl' method inside videojs-contrib-hls.js, to modify the target url for index.m3u8
  • use the 'player.hls.xhr.beforeRequest' callback(specific to videojs-contrib-hls) or the 'videojs.Hls.xhr.beforeRequest' callback(specific to videojs)

Any of the above method is NOT working in case of Mac Safari. The code flow won't even hit any of the above methods. I'm guessing it's because, I'm not able to override the native hls behaviour on Safari, even after using the required 'overrideNative' parameter.

videojs.options.hls.overrideNative = true;
videojs.options.html5.nativeAudioTracks = false;
videojs.options.html5.nativeVideoTracks = false;

Is there any other way to intercept the index.m3u8 calls and/or force the contrib-hls behaviour over the native hls behaviour?

videojs-contrib-hls version

videojs-contrib-hls 5.12.2

videojs version

video.js 6.7.3

Browsers

  • Safari 11.0.3

Platforms

  • MacOS 10.13.3

Audio only toggle (disable video but continue playing the audio stream)

Description

Is there a way to programatically disable the video stream while continuing to play the selected audio stream for HLS streams?

Results

Expected

Clicking on a audio only toggle would allow me to disable the video stream (maybe replace with an image) but allow the audio to continue running to save bandwidth while driving

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls 5.14.0

videojs version

what version of videojs does this occur with?
video.js 5.6.0

Trigger tech event when master playlist failed to load

Hi there, I'm wondering if we could add a line like

this.tech_.trigger('nomasterplaylist');

somewhere around https://github.com/videojs/videojs-contrib-hls/blob/master/src/master-playlist-controller.js#L864

Because this is a pretty frequent case with broken CORS headers, but all I can rely on is the tech.trigger('error', hlserror), so I have to set a handler on the very generic 'error' event and then filter out by "HLS" being in the error message which is not.. ideal..

What do you think?

cc @robinmaben

What are the differences to videojs-contrib-hls?

Hi, I seriously appreciate your work and I am totally overwhelmed that there are now two hls projects in the videojs org, but it also would be really great if you would like to explain (maybe in a blog post) the reasoning behind those two repos - why does this repo exist and how does it relate to videojs-contrib-hls?

As a casual user I find the current situation very confusing. Which codebase to follow?

Thank you very much!

m3u8 in mobile cannot requestAnimationFrame?

Hi,

I am creating a video stream app, i am using drawImage() to copy from video to canvas, it is well working in PC, but when i am testing it on my phone it seems drawImage is not working. is m3u8 have restriction over it? or i did wrong?

Thanks

this is my working phone, hope you can answer my questions

`function HLSFunc(a,b,c){
if (document.getElementById('ng-player') == null ){
var videojsContainer = document.createElement('video-js');
videojsContainer.id = "ng-player";
document.getElementById('ng-container').appendChild(videojsContainer);
document.getElementById('ng-player').setAttribute('width','100')
document.getElementById('ng-player').setAttribute('height','100')
document.getElementById('ng-player').setAttribute('controls',true)
document.getElementById('ng-player').setAttribute('playsinline',true);
}
player = videojs('ng-player');
var url = 'https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8'
var mimetype = 'application/x-mpegURL';

        videojs.Hls.xhr.beforeRequest = function(options) {
          drawToCanvas();
          return options;
        };

        player.ready(function() {
          this.src({
            src: url,
            type: mimetype
          });
        });
      }

      function drawToCanvas(){

        var video = $('#ng-player_html5_api')[0];
        var inputCtx = $('#canvas')[0].getContext('2d');

        inputCtx.drawImage(video,0,0,420,320);
        window.requestAnimationFrame(drawToCanvas);
      }`

Prevent downloading encrypted content with Firefox video download helper extension

Hi All,

We have spent quite a bit of time trying to provide the best possible security by encoding our media through AWS with AES 128 bit encryption this has worked great for a long time but like everything on the web we have been shown that this can be easily downloaded using the following plugin.

https://addons.mozilla.org/en-GB/firefox/addon/video-downloadhelper/

Simply install the extension in Firefox and then install the companion app and click download and covert

We have set up an example below.
http://output.jsbin.com/fabefit/1/

Can anyone suggest any way to prevent this I totally understand that its pretty much impossible to prevent videos from being stolen simply using screengrab software will do the job and nothing can prevent this but it would be good to prevent simple downloads from extensions make it as hard as possible?

We recently viewed a post here: videojs/videojs-contrib-hls#1337 about possibly obfuscating the requests.

Maybe we are missing a step that can prevent this any info would be appreciated?

Thanks

Broken design

This morning I noticed that the videos on my site were all broken, as if a css file had not loaded. I then looked online and saw https://videojs.github.io/http-streaming/ also had the same problem I'm having.

I also saw VideoJS updated to version 7 - could this be the source of the problem?

screen shot 2018-05-20 at 09 49 44

What could I do to go around this problem?

Thanks,
Diego

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.