Skip to content

Commit

Permalink
Merge branch 'development' into feature-Dash-Industry-Forum#3514
Browse files Browse the repository at this point in the history
  • Loading branch information
mlasak authored Feb 23, 2021
2 parents ad265ef + fa2e24b commit e27676a
Show file tree
Hide file tree
Showing 88 changed files with 5,079 additions and 679 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
12 changes: 11 additions & 1 deletion 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 Expand Up @@ -46,8 +50,14 @@ For help, join our [Slack channel](https://dashif-slack.azurewebsites.net), our

If you are migrating from dash.js v2.x to dash.js v3.x please read the migration document found [here](https://github.com/Dash-Industry-Forum/dash.js/wiki/Migration-3.0).

Details of low latency streaming are covered on the wiki [here](https://github.com/Dash-Industry-Forum/dash.js/wiki/Low-Latency-streaming)
## Tutorials

Detailed information on specific topics can be found in our tutorials:

* [Low latency streaming](https://github.com/Dash-Industry-Forum/dash.js/wiki/Low-Latency-streaming)
* [UTCTiming Clock synchronization](https://github.com/Dash-Industry-Forum/dash.js/wiki/UTCTiming---Clock-synchronization)
* [Digital Rights Management (DRM) and license acquisition](https://github.com/Dash-Industry-Forum/dash.js/wiki/Digital-Rights-Management-(DRM)-and-license-acquisition)
* [Buffer and scheduling logic](https://github.com/Dash-Industry-Forum/dash.js/wiki/Buffer-and-Scheduling-Logic)

## Getting Started

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
46 changes: 44 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 All @@ -133,6 +132,20 @@ declare namespace dashjs {
useAppendWindow?: boolean,
manifestUpdateRetryInterval?: number;
stallThreshold?: number;
filterUnsupportedEssentialProperties?: true
utcSynchronization?: {
backgroundAttempts?: number,
timeBetweenSyncAttempts?: number,
maximumTimeBetweenSyncAttempts?: number,
minimumTimeBetweenSyncAttempts?: number,
timeBetweenSyncAttemptsAdjustmentFactor?: number,
maximumAllowedDrift?: number,
enableBackgroundSyncAfterSegmentDownloadError?: boolean,
defaultTimingSource?: {
scheme?: string,
value?: string
}
},
liveCatchup?: {
minDrift?: number;
maxDrift?: number;
Expand Down Expand Up @@ -168,6 +181,7 @@ declare namespace dashjs {
'BitstreamSwitchingSegment'?: number;
'IndexSegment'?: number;
'other'?: number;
'lowLatencyReductionFactor'?: number;
};
retryAttempts?: {
'MPD'?: number;
Expand All @@ -177,6 +191,7 @@ declare namespace dashjs {
'BitstreamSwitchingSegment'?: number;
'IndexSegment'?: number;
'other'?: number;
'lowLatencyMultiplyFactor'?: number;
};
abr?: {
movingAverageMethod?: 'slidingWindow' | 'ewma';
Expand Down Expand Up @@ -215,7 +230,9 @@ declare namespace dashjs {
cmcd?: {
enabled?: boolean,
sid?: string,
cid?: string
cid?: string,
rtp?: number,
rtpSafetyFactor?: number
}
}
}
Expand Down Expand Up @@ -330,6 +347,10 @@ declare namespace dashjs {
getProtectionController(): ProtectionController;
attachProtectionController(value: ProtectionController): void;
setProtectionData(value: ProtectionDataSet): void;
registerLicenseRequestFilter(filter: RequestFilter),
registerLicenseResponseFilter(filter: ResponseFilter),
unregisterLicenseRequestFilter(filter: RequestFilter),
unregisterLicenseResponseFilter(filter: ResponseFilter),
getOfflineController(): OfflineController;
enableManifestDateHeaderTimeSource(value: boolean): void;
displayCaptionsOnTop(value: boolean): void;
Expand Down Expand Up @@ -428,6 +449,7 @@ declare namespace dashjs {
CAN_PLAY: 'canPlay';
CAPTION_RENDERED: 'captionRendered';
CAPTION_CONTAINER_RESIZE: 'captionContainerResize';
CONFORMANCE_VIOLATION: 'conformanceViolation'
DYNAMIC_TO_STATIC: 'dynamicToStatic';
ERROR: 'error';
FRAGMENT_LOADING_ABANDONED: 'fragmentLoadingAbandoned';
Expand Down Expand Up @@ -997,6 +1019,26 @@ declare namespace dashjs {
sessionId: string | null;
}

export interface LicenseRequest {
url: string;
method: string;
responseType: string;
headers: object;
withCredentials: boolean;
messageType: string;
sessionId: string;
data: ArrayBuffer;
}

export interface LicenseResponse {
url: string;
headers: object;
data: ArrayBuffer;
}

export type RequestFilter = (request: LicenseRequest) => Promise<any>;
export type ResponseFilter = (response: LicenseResponse) => Promise<any>;

export interface IBufferLevel {
level: number;
t: Date;
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
1 change: 1 addition & 0 deletions samples/chromecast/receiver/js/DashPlayerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ angular.module('DashCastReceiverApp.services', [])
_state = cast.receiver.media.PlayerState.BUFFERING;
player = dashjs.MediaPlayer().create();
player.initialize(videoElt, url, true);
player.updateSettings({ 'streaming': { 'flushBufferAtTrackSwitch': true }});
player.setProtectionData(protData);
initialized = true;
player.attachTTMLRenderingDiv(captionElt);
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/"
}
]
}
22 changes: 22 additions & 0 deletions samples/dash-if-reference-player/app/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -568,3 +568,25 @@ CONTROL BAR CSS NEEDS TO MOVE INTO THE CONTROL BAR
font-size: .9em !important;
padding: 0px;
}

/********************************************************
Conformance warnings
*********************************************************/
.label-Warning {
background-color: #f0ad4e;
}

.label-Error {
background-color: #d9534f;
}

.label-Suggestion {
background-color: #5bc0de;
}

.conformance-violations-panel {
background-color: #ffffff;
margin-top: 15px;
margin-bottom: 15px;
padding: 12px;
}
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.
Binary file modified samples/dash-if-reference-player/app/img/fh_fokus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e27676a

Please sign in to comment.