Giter Club home page Giter Club logo

videojs-contrib-dash's Introduction

video.js MPEG-DASH Source Handler

Build Status Greenkeeper badge Slack Status

NPM

A video.js source handler for supporting MPEG-DASH playback through a video.js player on browsers with support for Media Source Extensions.

Supported Dash.js version: 4.x

Maintenance Status: Stable

Drop by our slack channel (#playback) on the Video.js slack.

Table of Contents generated with DocToc

Getting Started

Download Dash.js and videojs-contrib-dash. Include them both in your web page along with video.js:

<video id=example-video width=600 height=300 class="video-js vjs-default-skin" controls></video>
<script src="video.js"></script>

<!-- Dash.js -->
<script src="dash.all.min.js"></script>

<!-- videojs-contrib-dash script -->
<script src="videojs-dash.min.js"></script>

<script>
var player = videojs('example-video');

player.ready(function() {
  player.src({
    src: 'https://example.com/dash.mpd',
    type: 'application/dash+xml'
  });

  player.play();
});
</script>

Checkout our live example if you're having trouble.

Protected Content

If the browser supports Encrypted Media Extensions and includes a Content Decryption Module for one of the protection schemes in the dash manifest, video.js will be able to playback protected content.

For most protection schemes, the license server information (URL & init data) is included inside the manifest. The notable exception to this is Widevine-Modular (WV). To playback WV content, you must provide the URL to a Widevine license server proxy.

For this purpose, videojs-contrib-dash adds support for a "keySystemOptions" array to the object when using the player.src() function:

player.src({
  src: 'http://example.com/my/manifest.mpd',
  type: 'application/dash+xml',
  keySystemOptions: [
    {
      name: 'com.widevine.alpha',
      options: {
        serverURL: 'http://m.widevine.com/proxy'
      }
    }
  ]
});

You may also manipulate the source object by registering a function to the updatesource hook. Your function should take a source object as an argument and should return a source object.

var updateSourceData = function(source) {
  source.keySystemOptions = [{
    name: 'com.widevine.alpha',
    options: {
      serverURL:'https://example.com/anotherlicense'
    }
  }];
  return source;
};

videojs.Html5DashJS.hook('updatesource', updateSourceData);

Captions

As of [email protected], native captions are no longer supported on any browser besides Safari. Dash can handle captions referenced embedded vtt files, embedded captions in the manifest, and with fragmented text streaming. It is impossible to use video.js captions when dash.js is using fragmented text captions, so the user must disable native captions when using videojs-contrib-dash.

videojs('example-video', {
  html5: {
    nativeCaptions: false
  }
});

A warning will be logged if this setting is not applied.

Using TTML Captions

TTML captions require special rendering by dash.js. To enable this rendering, you must set option useTTML to true, like so:

videojs('example-video', {
  html5: {
    dash: {
      useTTML: true
    }
  }
});

This option is not true by default because it will also render CEA608 captions in the same method, and there may be some errors in their display. However, it does enable styling captions via the captions settings dialog.

Multi-Language Labels

When labels in a playlist file are in multiple languages, the 2-character language code should be used if it exists; this allows the player to auto-select the appropriate label.

Passing options to Dash.js

It is possible to pass options to Dash.js during initialiation of video.js. All methods in the Dash.js#MediaPlayer docs are supported.

To set these options, pass the exact function name with a scalar or array value to call the correpsonding MediaPlayer function.

For example:

var player = videojs('example-video', {
  html5: {
    dash: {
      setLimitBitrateByPortal: true,
      setMaxAllowedBitrateFor: ['video', 2000]
    }
  }
});

A warning will be logged if the configuration property is not found.

Deprecation Warning

Previously the set prefix was expected to be omitted. This has been deprecated and will be removed in a future version.

Initialization Hook

Sometimes you may need to extend Dash.js, or have access to the Dash.js MediaPlayer before it is initialized. For these cases, you can register a function to the beforeinitialize hook, which will be called just before the Dash.js MediaPlayer is initialized.

Your function should have two parameters:

  1. The video.js Player instance
  2. The Dash.js MediaPlayer instance
var myCustomCallback = function(player, mediaPlayer) {
  // Log MediaPlayer messages through video.js
  if (videojs && videojs.log) {
    mediaPlayer.getDebug().setLogToBrowserConsole(false);
    mediaPlayer.on('log', function(event) {
      videojs.log(event.message);
    });
  }
};

videojs.Html5DashJS.hook('beforeinitialize', myCustomCallback);

videojs-contrib-dash's People

Contributors

alex-barstow avatar boushley avatar brandonocasey avatar charud avatar dmlap avatar ericrav avatar forbesjo avatar fozzle avatar gesinger avatar gkatsev avatar greenkeeper[bot] avatar greenkeeperio-bot avatar heff avatar imbcmdth avatar justinanastos avatar ldayananda avatar mjneil avatar nickygerritsen avatar philjhale avatar sevagsim avatar squarebracket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videojs-contrib-dash's Issues

Re-load the video with contrib on ended event

Is it possible to re-load the video when using videojs-contrib-dash on ended event?

We previously used to listen to the ended event and used video.load() to re-load the video and re-display the poster image ready for a possible replay by the user.

I tried adding the .load() method to the videojs player when using contrib, but it doesn't work anymore, e.g. myPlayer.load()

Is there a way to re-load the video when usng contrib?

Anyone got this to work, or know how to do it please?

Dash is not defined error with dash-2.0.0

I have downloaded dash-2.0.0 and include in script with dash.all.min.js i got thi error.

Uncaught ReferenceError: Dash is not defined
Html5DashJS @ videojs-dash.js:72
videojs.getComponent.registerSourceHandler.handleSource @ videojs-dash.js:220
Tech.setSource @ tech.js:719
techCall
@ player.js:1195
(anonymous function) @ player.js:1881
ready @ component.js:815
src @ player.js:1875
(anonymous function) @ index.html?editors=1000:28(anonymous function) @ index.html?editors=1000:33

Best Way To Enable HTML Subtitles?

What's the best way to replicate this with Video.js?

var url = "http://rdmedia.bbc.co.uk/dash/ondemand/elephants_dream/1/client_manifest-snake.mpd";
var player = dashjs.MediaPlayer().create();
player.initialize(document.querySelector("#playerjs"), url, true);
ttmlDiv = document.querySelector("#video-caption");
player.attachTTMLRenderingDiv(ttmlDiv);

This is how the Dash.js player is implementing the HTML subtitle display, as seen in their demo:
http://dashif.org/reference/players/javascript/v2.2.0/samples/dash-if-reference-player/

Otherwise it's just the fallback display, without style.. The HTML subtitles use styling and position.

CloudFront signature

Is there any way we can pass cloudfront directory signature to videoJS ?
/folder/file.mpd
/folder/segments/file.mp4
My signature is on the folder level I just need to pass it to the VideoJS.

Example URL:

https://dqa1slkm3n32i.cloudfront.net/output/50505_8a057bc4c7cceb4b5015cc0233699c86/50505.mpd

---Signature--

Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kcWExc2xrbTNuMzJpLmNsb3VkZnJvbnQubmV0L291dHB1dC81MDUwNV84YTA1N2JjNGM3Y2NlYjRiNTAxNWNjMDIzMzY5OWM4Ni8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNDUyNjgxOTAxfX19XX0_&Signature=FwMRzQlW1tgycmgGFiFfDTPKDlsozy2IDG3JsAysbxkrmkzurb8uP-OjBOPvEGblf1InDwsKc6-fwZUYc9MMtpA-u3BqZ19tbGHfOxw7TUVuTOw35UGso8xtdclpj3fSSduY7aB3TMDiUSMwRDHNE2iEEbP5MowjmyR-Yd54V8J1poWTqa0y5fn6Z5KrItoihjMglntMxMD~gPRgkgrFw13zLAdDk-N-N8zgIyweUGaZ4O70bKFaulYyBlil0omxJ34CJ4LwfNJr1e4mSs3XaOQhmiC6SOj9ckGx-62BR6JFhou0UJyjF7pbcvtxVOY65Wps3ZOblssYEaTo6w__&Key-Pair-Id=APKAIXEL5M5KRSFNCUNA

Rewrite to ES6

Rewrite this plugin in ES6. Use a babel transform with grunt-browserify.
See #38

Use BrowserStack for Karma/Selenium tests

Currently we run the unit tests in phantomjs and Selenium tests in Sauce Labs. I think we should start using Karma for the unit tests like video.js/other plugins and BrowserStack as our browser provider since it seems faster/more stable.

MEDIA_ERR_SRC_NOT_SUPPORTED when updating source

Hello, I have an issue when updating source on initialized player object. Sample code

            window.player.src({
                type : type,
                src: val.src,
                keySystemOptions: [
                    {
                        name: 'com.widevine.alpha',
                        options: {
                            licenseUrl: widevine_la_url
                        }
                    },
                    {
                        name: 'com.microsoft.playready',
                        options: {
                            licenseUrl: playready_la_url
                        }
                    }
                ]
            });

This results in the following error:

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported

Plugin version 2.1.0

Contrib-dash not working in Microsoft Edge

VideoJS-contrib-dash does not seem to work in Microsoft's new browser Edge. The browser does support Dash, because a stand-alone dash.js player does work in the browser.

When using it with VideoJS through contrib-dash, the player fails. No usefull console-output, just the basic error.

"The video could not be loaded, either because the server or network failed or because the format is not supported."

Multiple sources?

I wanted to initiate a discussion for handling multiple sources (And if its even feasible).

   * **Array of Source Objects:* * To provide multiple versions of the source so
   * that it can be played using HTML5 across browsers you can use an array of
   * source objects. Video.js will detect which version is supported and load that
   * file.

As specified by https://github.com/videojs/video.js/blob/master/src/js/player.js#L1859.


It doesn't seem that the candHandleSource, specified in https://github.com/videojs/videojs-contrib-dash/blob/master/src/js/videojs-dash.js#L112, is very robust (I am not very familiar with SourceHandlers).

However, understandably a majority of the detect is specified by the !!window.MediaSource.


Current use case is for protected content:

  1. Pass in 2 sources, the first being for IE and the second being for Chrome
  2. Expect IE to fail on Chrome
  3. Expect retry? and Chrome to work

(There are limitations with dash.js and multiple sources—hence the conversation)

Is it possible to support browser < IE11 ?

Thanks for your great project.
I know dash.js just support browser > IE11
Now I consider use HLS with flash Videojs when the browser < IE11
Is this 'videojs-contrib-dash' could support like this . How ?
Thanks

Dash.js integration

Is/Will there be any documentation on how to integrate with Dash.js/API?

I am currently leveraging Html5DashJS.useVideoJSDebug (https://github.com/videojs/videojs-contrib-dash/blob/master/src/js/videojs-dash.js#L74)

Are there other integration points within the tech?


Here is my current implementation to disable logging.

import 'dashjs';
import 'video.js';
import 'videojs-contrib-dash/dist/videojs-dash.js';

videojs.Html5DashJS.useVideoJSDebug = function (player) {
  // https://github.com/Dash-Industry-Forum/dash.js/blob/development/samples/getting-started-basic-embed/listening-to-events.html#L17
  player.getDebug().setLogToBrowserConsole(false);
};

Knowing that there is a open ES6 PR, are there plans to handle this differently?

Using dash.js APIs in combination with video.js APIs when using videojs-contrib-dash

Please can anyone provide some info on using dash.js APIs in combination with video.js APIs when using videojs-contrib-dash

In Particular, we'd like to use the dash.js APIs:
MediaPlayer.setMaxAllowedBitrateFor('video', 2000) // to limit the quality when not Fullscreen
MediaPlayer.setMaxAllowedBitrateFor('video', NaN) // to remove a cap when Fullscreen

But as far as I understand it, videojs-contrib-dash grasps control of the normal DASH context and source and passes this to video.js. So, how would we use these DASH APIs in conjunction with video.js controlling the player?

Any example code asap would be hugely appreciated!

Thanks

Richard

Dash example video doesn't work on Safari 9

Hi, the example videojs dash doesn't work on Safari 9. I was doing some compatibility tests and I tryed the example page http://videojs.github.io/videojs-contrib-dash/ and it doesn't work well on Safari 9 (OSX 10.11). Can it be connected with some specific codec compatibility for Safari? Console does not throw any errors and it looks like it loads the content and starts playing ok. Time is also updatig, but there is only sound and no picture and it gets stucked after seek. I tryed different source on my implementation and it worked ok.

DASH Video does not show as Live

Dash video live streams do not show as live. And even attempting work around (like setting controls to off and turing on the live setting) do not work. In fact he entire data-setup attribute is ignored all together. I know that it works at first because on page load I see videojs with the settings I have in the config. But after the dash gets loaded it all gets removed.

Version 2.x vs 1.x

Looking at the releases, I noticed a v2.0.0 and a more recent v1.1.2. What is the difference between the two? Is v2.0.0 for use with the newly released dash.js 2.0.0?

videojs contrib dash 2.0.0 fails with IE on Win7

Hi Joe

Sorry, just seen you've closed the original issue, so I've re-posted this as a new issue.

Thanks very much for v2.0.0.

We have just tested it with DASH as first src, then MP4 as 2nd src (fallback).

Works fine in Win 8.1, on IE (Dash), Chrome (Dash), Firefox (MP4 fallback).

But on Win 7, IE fails (should fallback to MP4). It should fallback to MP4 (2nd src), but it fails with the error:
--- The Media Could Not Be Loaded... ---
Chrome (Dash) and Firefox (MP4 fallback) are fine, just fails on IE?

Any ideas on a fix?

UPDATE: this might be a CODEC issue! IE won't play this particular MP4 file in a video tag even without dash or contrib, but the other browsers will. Strange, looking into this.

Richard

How can i use videojs-dash with dash-2.0.0 ?

i want to update myself day by day for better performance with less bug and tell me how i can use with dash-2.0.0 or when you people are going to update the latest version to use with dash-2.0.0 ?

Adaptive MPD cannot playing in chrome

I just get problem with this url: http://dash.edgesuite.net/dash264/TestCases/2a/qualcomm/1/MultiResMPEG2.mpd take from http://dashif.org/test-vectors

use

  • Videojs 5.10.3
  • Dashjs 2.2.0
  • Videojs-contrib-dash 2.3.0

Here is log
image
Everything seem to be normal until message Playback Initialized appear second times and then player can't play anything. But Firefox and Edge play fine. I don't know why...

So i take a look at code,

handleSource: function(source, tech) {
      return new Html5DashJS(source, tech);
    },

and

if (!this.mediaPlayer_) {
      this.mediaPlayer_ = dashjs.MediaPlayer(Html5DashJS.context_).create();
    }

It's seem like this.mediaPlayer_ always null when handleSource fire. So i change it with hope that Playback don't init twice.

if (!player.mediaPlayer_) {
      player.mediaPlayer_ = dashjs.MediaPlayer(Html5DashJS.context_).create();
    }

and use player.mediaPlayer_ instead of this.mediaPlayer_ after all. And player run like Usain Bolt. I check log then still see Playback Initialized twice. And i don't have any idea why it don't play and even why it play.
Do I miss something and that code change make anything not working? Thanks.

Edit: I think problem is from dispose function. if i comment code inside that function, mpd play normally without changing anything else.

Mpd video type files are not playing in firefox browser

In chrome browser, mpd video types are playing properly without any issues. But, In firefox browser below error occurred.

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

screen shot 2016-05-25 at 2 30 57 pm

Dash with panorama

Hello.
I have a question, very simple thing but nobody check this problem.

Is it impossible for using both dash and panorama?
Lots of examples show that dash + video.js is very good. However, when I use dash + video.js + panorama, something is wrong.
image

In this screenshot, there is no data in .mpd file. But I have mpd file data!.
Also, when I use non-panorama-video, nothing was happened. Very well.

I don't know why that is happen.:(

mediaPlayer object availability

MediaPlayer object was available directly on the player instance in the older contrib version (videojs-tech-dashjs.js). Is there reason why is not available anymore?

Or is there any other way how to change quality manualy (setQualityFor)?

VOD DASH streaming with nginx?

Using https://github.com/arut/nginx-rtmp-module
Got this working with videojs:
src="rtmp://mysite.com/vod/&mp4:52725.mp4?foo=fie" type="rtmp/mp4"
Nginx streams the mp4, and my php script gets the on_play notification to validate foo=fie
Perfect!

Now failing to stream dash like so:
rtmp://mysite.com/vodash/&mp4:19577.mpd?foo=fiddle" type="rtmp/mp4"

I begin to wonder if I am throwing stones at the sky. Is this even possible?
Can nginx stream DASH VOD?

Works (mp4 no dash)

    application vod {
        play /home/mysite/content/mp4;
        on_play http://mysite.com/onplay.php;
    }

Thought I would be able to add "dash on;" to the config, change the application name to vodash and be happy.

Apologies for posting a related issue, not specifically tied to the project.
Not finding help elsewhere yet, hoping a soul here will recognize my problem.

Stream doesn't start when ad finishes

I'm not sure where to report this issue. I'm currently testing videojs-dash plugin for videojs with vast-vpaid plugin https://github.com/MailOnline/videojs-vast-vpaid. There is an issue of a stream not starting after the ad finishes. There is a configured live example with debug versions of plugins here http://player.cavar.pw/videojs-vast/

Example code used for embedding:

var setup = {
    'techOrder' : ['html5'],
    'controls' : false,
    'preload' : 'auto',
    'autoplay' : true,
};

window.player = videojs('video-js', setup, function() {
    this.vastClient({
        adTagUrl: 'https://hr.adocean.pl/ad.xml?id=freWvTXJkuOn6vrKYuPyUkapzdpV5yco97oIDkMlvOn.y7/aocodetype=1',
        playAdAlways: true
    });

    this.src({
        type : 'application/dash+xml',
        src: "http://coder01.spectar.tv:1935/live/_definst_/colorbars/manifest.mpd",
    });
});

document.querySelector("#button").addEventListener('click', function(e) {
    window.player.src({
        type : 'application/dash+xml',
        src: "http://coder01.spectar.tv:1935/live/_definst_/colorbars1/manifest.mpd",
    });
});

I have noticed the player starts buffering the stream before the ad starts, and after that it cannot resume.

Dash and HLS

Because of the recent bad news about Flash (Firefox is even blocking the most recent version!), I started to investigate how I could distribute my livestreams different.

At the moment, I serve a rtmps stream for desktops (so, Flash) with HLS on Android/iOS with the standard Video.JS. Now I was trying to get MPEG-DASH to work, because of the lack of support for HLS in desktopbrowsers.

I can get the DASH stream to work in Chrome and IE, but not in Firefox. Is this correct? DASH doesn't work on my Android device, so I added the HLS source too. But the player doesn't serve the right one automaticly, with as result my stream no longer works on Android, because it tries to serve DASH.

I then tried to switch the sources, HLS first and DASH as second. Then Android works again, and all desktop browsers are broken.

Is it possible to serve DASH to desktopbrowsers and HLS to iOS/Android, so you can stream completely without Flash? I'm starting to doubt it.....

Dash fails after pressing pause

I'm having trouble with restarting a dash-livestream with Video.JS. Starting a stream is fine, but after you press 'pause', it's not possible to start the stream again. It results in the following errors if I press play again:

dash.all.js:9 <video> play
dash.all.js:9 Refresh manifest in 5.402 seconds.
dash.all.js:9 [video] start
dash.all.js:9 <video> playing
dash.all.js:9 [video] Stalling Buffer
dash.all.js:9 [video] Waiting for more buffer before starting playback.
dash.all.js:9 <video> play
dash.all.js:9 Refresh manifest in 5.402 seconds.
dash.all.js:9 [video] start
113fc84e-d5b3-4555-895f-579b69f28cfd:1 GET blob:http%3A//mysite.ltd/113fc84e-d5b3-4555-895f-579b69f28cfd 404 (Not Found)
video.js:24 VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The video could not be loaded, either because the server or network failed or because the format is not supported. t.J {code: 4, message: "The video could not be loaded, either because the …rk failed or because the format is not supported."}F @ video.js:24t.log.error @ video.js:24s.error @ video.js:80s.Td @ video.js:125e @ video.js:14t.b.e.ba.e.ba @ video.js:7
dash.all.js:9 Video Element Error: MEDIA_ERR_SRC_NOT_SUPPORTED
dash.all.js:9 undefined
dash.all.js:9 [video] stop

As you can see, I get a 404-error from some kind of 'blob' URL. This URL, here called mysite.ltd is NOT the URL of my stream, but the URL of the domain the player is located.

Why does the player call a URL like that and is this fixable? It should just call the manifest again I would say.

VideoJS wants Sources, DashJS wants NO Sources

We have an issue with the loadstart event firing twice.
VideoJS wants expressly stated Sources within the Video tag, DashJS wants NO Sources and wants to add the Source programmatically.
Bottom line is that double loadstart events are triggered, meaning that VJS 5.10.2+ fails.
See:
videojs/video.js#3428
Could videojs-contrib-dash make them play together nicely? Or should VideoJS add programmatic source option?
Any ideas please?

Replay video

We've tried everything but Replay video fails with continuous spinner most of the time.
Even with the example player if fails often when re-pressing the play button after it's ended: http://videojs.github.io/videojs-contrib-dash/
Our own tests use dash 1.5.1 + contrib 2.0.0 + vjs 5.0.2 and same thing, replay often fails with continuous spinner.
We've also tried:
player.on('ended', function () {
player.exitFullscreen();
player.hasStarted(false);
But again this fails sometimes and works other times.
Any idea on a fix to replay everytime reliably please?
It seems to not reset reliably.

Dash 1.5 integration

Dashjs is currently at 1.4 and has refactored Dash-Industry-Forum/dash.js#676 for development.

I tried to upgrade to use the latest version of dashjs#development (1.5) which includes PR #676, but it looks there is breaking changes with videojs-contrib-dash integration.

Dash-Industry-Forum/dash.js#664

https://groups.google.com/forum/#!topic/dashjs/jQ0B5Q-xOlw

I am guessing this is known? Or is there a planned feature branch for migration?

I'll dig deeper into it next week to figure why playback is breaking (Currently video stalls at the end of the video as soon as you press play).

Player not refreshing live source manifest

There is an issue with a live source. Player is not refreshing manifest when using this plugin on videojs. Player plays for a while until it runs out of first batch of chunks, then it stops. I've tested the source using dashjs reference player and it works correctly.
This live example is still running for debugging purposes with dashjs 2.1.1 and videojs-dash 2.3.0: http://player.cavar.pw/videojs/
Issue was also present on videojs-dash version 2.2.0.
You can use this stream as a reference: http://coder01.spectar.tv:1935/live/_definst_/colorbars/manifest.mpd
It's coming from wowza version 4.4.1.

EDIT
I updated the test urls since the streams stopped working on https

VideoJS 5.0 integration

I also noticed that they are moving away from closure?

At least, https://github.com/videojs/video.js/blob/v4.12.13/src/js/exports.js doesn't exist in 5.0.

videojs.Html5 no longer exists and chokes on load.

screen shot 2015-08-11 at 11 49 15 am


My issues are kind of all over the place as I am trying to figure out how to reload a src with protection data (videojs('player').src({...})). As it doesn't seem like there is any mechanism to do so.

From player > tech > source handler.

I will continue my efforts using 4.12 for now I suppose.

grumblecakes

Consider adding seekable() method

Dash.js supports a metric called DVRInfo, which should give us enough information to use for a seekable() implementation for DVR live content. See also Dash-Industry-Forum/dash.js#1384 for some info.

I am willing to add the seekable() implementation myself, as it seems not too hard (as soon as we know what to do with the fact that DVRInfo is an array).

As far as I know just adding a seekable() method to the Html5DashJS class should do the trick, right?

Any objections or opinions?

Protected Content

Hi,

can you help me to integrate BuyDRM with videoJS DASH ?

HTML5 Working Example,
http://demo.keyos.com/html5/KeyOS_SmoothDRM_Service_ForPlayReady.html

var createProtectionData = function (customData) {
      return {
        "com.widevine.alpha": {
          serverURL: "https://widevine.licensekeyserver.com",
          httpRequestHeaders: {customdata: customData},
          clearkeys: ""
        },
        "com.microsoft.playready": {
          serverURL: "http://sldrm.licensekeyserver.com/core/rightsmanager.asmx",
          httpRequestHeaders: {customdata: customData},
          clearkeys: ""
        }
      }
    };

.....
      player = dashjs.MediaPlayer().create();

      player.setProtectionData(
        createProtectionData(
          'PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxLZXlPU0F1dGhlbnRpY2F0aW9uWE1MPjxEYXRhPjxQb2xpY3k+.......WejJKYjVZQ2J2S0RpSW5UK05RPT08L1NpZ25hdHVyZT48L0tleU9TQXV0aGVudGljYXRpb25YTUw+Cg=='
        )
      );

Dash Playback Issue when embedded in Angular2 Application

I know Angular2 is in alpha but I still thought I would bring this to your attention.

I am currently messing around with an Angular2 wrapper around videojs and when I try to incorporate dash into the player I am getting the following error in the console.

Parsing complete: ( xml2json: 4ms, objectiron: 4ms, total: 0.008s)
dash.all.js:9 Playback initiated!
dash.all.js:9 Manifest has been refreshed.
dash.all.js:9 Manifest has loaded.

VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The video could not be loaded, either because the server or network failed or because the format is not supported.

Now if I take the video tag with the same exact properties outside of the Angular2 wrapper everything works as expected.

A couple of points:

  • I have verified that the video tag has a unique ID.
  • I am testing the application in Chrome Version 47.0.2496.0 canary (64-bit)
  • I am able to use the HLS plugin in this same wrapper and everything works perfectly.
  • For some reason (maybe another issue should be raised) if trying to play HLS and DASH in two separate players on the same page, the HLS player will fail.

Stepping through the workflow I cant seem to find when or where the error occurs.

I can provide the setup and code necessary to replicate if its desired.

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.