Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Feb 10, 2021
2 parents 6d53727 + d10013a commit a44fb6c
Show file tree
Hide file tree
Showing 56 changed files with 3,038 additions and 249 deletions.
3 changes: 1 addition & 2 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"requireSpaceAfterKeywords": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpacesInConditionalExpression": true, // Ternary if
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInForStatement": true,
"requireSpacesInFunctionExpression": {
Expand All @@ -27,7 +27,6 @@
"allExcept": ["comments"]
},
"jsDoc": {
"checkTypes": "strictNativeCase",
"checkParamExistence": true,
"checkParamNames": true,
"requireParamTypes": true,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Build status (CircleCI): [![CircleCI](https://circleci.com/gh/Dash-Industry-Foru

[Join #dashjs on Slack!](https://join.slack.com/t/dashif/shared_invite/zt-egme869x-JH~UPUuLoKJB26fw7wj3Gg)

## dash.js awards 2021
The DASH Industry Forum (DASH-IF) is proud to announce its second dash.js award. Again, we are looking for developers who made contributions of significant benefit to the advancement of the dash.js project.
All information can be found [here](https://github.com/Dash-Industry-Forum/dash.js/wiki/dash.js-awards-2021).

## Overview
A reference client implementation for the playback of MPEG DASH via JavaScript and [compliant browsers](http://caniuse.com/#feat=mediasource). Learn more about DASH IF Reference Client on our [wiki](https://github.com/Dash-Industry-Forum/dash.js/wiki).

Expand Down
3 changes: 3 additions & 0 deletions build/jsdoc/jsdoc_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"include": ["./src/", "README.md"]
},
"plugins": [ "plugins/markdown" ],
"markdown": {
"hardwrap": true
},
"templates": {
"cleverLinks" : true,
"monospaceLinks" : true,
Expand Down
7 changes: 5 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ declare namespace dashjs {
calcSegmentAvailabilityRangeFromTimeline?: boolean,
bufferPruningInterval?: number;
bufferToKeep?: number;
bufferAheadToKeep?: number;
jumpGaps?: boolean;
jumpLargeGaps?: boolean;
smallGapLimit?: number;
Expand Down Expand Up @@ -169,6 +168,7 @@ declare namespace dashjs {
'BitstreamSwitchingSegment'?: number;
'IndexSegment'?: number;
'other'?: number;
'lowLatencyReductionFactor'?: number;
};
retryAttempts?: {
'MPD'?: number;
Expand All @@ -178,6 +178,7 @@ declare namespace dashjs {
'BitstreamSwitchingSegment'?: number;
'IndexSegment'?: number;
'other'?: number;
'lowLatencyMultiplyFactor'?: number;
};
abr?: {
movingAverageMethod?: 'slidingWindow' | 'ewma';
Expand Down Expand Up @@ -216,7 +217,9 @@ declare namespace dashjs {
cmcd?: {
enabled?: boolean,
sid?: string,
cid?: string
cid?: string,
rtp?: number,
rtpSafetyFactor?: number
}
}
}
Expand Down
23 changes: 23 additions & 0 deletions samples/advanced/cmcd.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
player = dashjs.MediaPlayer().create();
video = document.querySelector("video");
player.initialize();
player.setTextDefaultEnabled(true);
version = player.getVersion();

player.on(CMCD_DATA_GENERATED, handleCmcdDataGeneratedEvent);
Expand All @@ -37,6 +38,27 @@
player.attachView(video);
player.attachSource(url);

var TTMLRenderingDiv = document.querySelector("#ttml-rendering-div");
player.attachTTMLRenderingDiv(TTMLRenderingDiv);
}

function handleCmcdDataGeneratedEvent(event) {
log("type: " + event.mediaType);
log("file: " + event.url.split("/").pop())
var keys = Object.keys(event.cmcdData);
keys = keys.sort();
for (var key of keys) {
log(key.padEnd(4) + ": " + event.cmcdData[key]);
}
log("");
}

function log(msg) {
msg = msg.length > 200 ? msg.substring(0, 200) + "..." : msg; /* to avoid repeated wrapping with large objects */
var tracePanel = document.getElementById("trace");
tracePanel.innerHTML += msg + "\n";
tracePanel.scrollTop = tracePanel.scrollHeight;
console.log(msg);
}

function handleCmcdDataGeneratedEvent(event) {
Expand Down Expand Up @@ -76,6 +98,7 @@
<div>
<video controls="true">
</video>
<div id="ttml-rendering-div"></div>
<textarea id="trace" placeholder="Sent CMCD data will be displayed here"></textarea>
</div>
<script>
Expand Down
117 changes: 66 additions & 51 deletions samples/dash-if-reference-player/app/contributors.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,68 @@
{
"items": [
{
"name": "Digital Primates",
"logo": "app/img/dp.png",
"link": "http://www.digitalprimates.net"
},
{
"name": "Akamai",
"logo": "app/img/akamai.png",
"link": "http://www.akamai.com"
},
{
"name": "Microsoft Open Technologies",
"logo": "app/img/MSOpenTech.jpg",
"link": "http://msopentech.com"
},
{
"name": "Fraunhofer Fokus",
"logo": "app/img/fh_fokus.png",
"link": "https://www.fokus.fraunhofer.de/go/fame"
},
{
"name": "CableLabs",
"logo": "app/img/cablelabs.png",
"link": "http://www.cablelabs.com"
},
{
"name": "YouTube",
"logo": "app/img/youtube.png",
"link": "http://www.youtube.com"
},
{
"name": "Senthil",
"link": "https://github.com/senthil-codr"
},
{
"name": "Brightcove",
"logo": "app/img/brightcove.png",
"link": "https://www.brightcove.com"
},
{
"name": "Edgeware",
"logo": "app/img/edgeware.png",
"link": "http://www.edgeware.tv/"
},
{
"name": "Epic Labs",
"logo": "app/img/epiclabs.png",
"link": "https://www.epiclabs.io/"
}
]
"items": [
{
"name": "Digital Primates",
"logo": "app/img/dp.png",
"link": "http://www.digitalprimates.net"
},
{
"name": "Akamai",
"logo": "app/img/akamai.png",
"link": "http://www.akamai.com"
},
{
"name": "Microsoft Open Technologies",
"logo": "app/img/MSOpenTech.jpg",
"link": "http://msopentech.com"
},
{
"name": "Fraunhofer Fokus",
"logo": "app/img/fh_fokus.png",
"link": "https://www.fokus.fraunhofer.de/go/fame"
},
{
"name": "CableLabs",
"logo": "app/img/cablelabs.png",
"link": "http://www.cablelabs.com"
},
{
"name": "YouTube",
"logo": "app/img/youtube.png",
"link": "http://www.youtube.com"
},
{
"name": "Senthil",
"link": "https://github.com/senthil-codr"
},
{
"name": "Brightcove",
"logo": "app/img/brightcove.png",
"link": "https://www.brightcove.com"
},
{
"name": "Edgeware",
"logo": "app/img/edgeware.png",
"link": "http://www.edgeware.tv/"
},
{
"name": "Epic Labs",
"logo": "app/img/epiclabs.png",
"link": "https://www.epiclabs.io/"
},
{
"name": "National University of Singapore",
"logo": "app/img/National_University_of_Singapore_logo_NUS.png",
"link": "https://nus.edu.sg/"
},
{
"name": "Özyeğin University",
"logo": "app/img/OzU_logo_eng.png",
"link": "https://www.ozyegin.edu.tr/"
},
{
"name": "Unified Streaming",
"logo": "app/img/US-logo-petrol-rgb.jpg",
"link": "https://www.unified-streaming.com/"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions samples/dash-if-reference-player/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'

config.streaming.cmcd.sid = $scope.cmcdSessionId ? $scope.cmcdSessionId : null;
config.streaming.cmcd.cid = $scope.cmcdContentId ? $scope.cmcdContentId : null;
config.streaming.cmcd.rtp = $scope.cmcdRtp ? $scope.cmcdRtp : null;
config.streaming.cmcd.rtpSafetyFactor = $scope.cmcdRtpSafetyFactor ? $scope.cmcdRtpSafetyFactor : null;

$scope.player.updateSettings(config);

Expand Down
15 changes: 12 additions & 3 deletions samples/dash-if-reference-player/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@
<input type="text" class="form-control" placeholder="mandatory session id" ng-model="cmcdSessionId">
<label class="options-label">Content ID:</label>
<input type="text" class="form-control" placeholder="content id" ng-model="cmcdContentId">
<label class="options-label" data-toggle="tooltip" data-placement="right"
title="A static value to be used as RTP parameter">Requested maximum throughput (rtp):</label>
<input type="text" class="form-control" placeholder="rtp in kbps" ng-model="cmcdRtp">
<label class="options-label" data-toggle="tooltip" data-placement="right"
title="This value is used as a factor for the rtp value calculation: rtp = minBandwidth * rtpSafetyFactor. If not specified this value defaults to 5. Note that this value is only used when no static rtp value is defined.">RTP
safety factor:</label>
<input type="text" class="form-control" placeholder="Default 5" ng-model="cmcdRtpSafetyFactor">
</div>
</div>

Expand Down Expand Up @@ -698,9 +705,9 @@
</div>
</div>
</div>

</div>

<!-- ERROR MODAL -->
<div class="modal fade" id="errorModal" tabindex="-1" role="dialog" aria-labelledby="errorModalLabel"
aria-hidden="true">
Expand Down Expand Up @@ -745,7 +752,9 @@ <h5 class="modal-title" id="errorModalLabel">Error {{errorType}}</h5>
<div id="conformance-violations">
<h4>Conformance Violations </h4>
<ul class="list-unstyled" ng-repeat="conformanceViolation in conformanceViolations">
<li><span class="label label-{{conformanceViolation.level}}">{{conformanceViolation.level}}</span> : {{conformanceViolation.event.message}} </li>
<li><span class="label label-{{conformanceViolation.level}}">{{conformanceViolation.level}}</span> :
{{conformanceViolation.event.message}}
</li>
</ul>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion samples/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
},
{
"title": "PlayReady",
"description": "This example shows how to use dash.js to play streams with PlayReady DRM protection (Windows only).",
"description": "This example shows how to use dash.js to play streams with PlayReady DRM protection (Windows 10 Microsoft Chromium Edge only).",
"href": "drm/playready.html"
},
{
Expand Down
Loading

0 comments on commit a44fb6c

Please sign in to comment.