Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/Dash-Industry-Forum/…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Feb 22, 2021
2 parents 03ae3c8 + 32cca0c commit 07d0a87
Show file tree
Hide file tree
Showing 106 changed files with 6,409 additions and 1,012 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ assignees: ''
1. Please provide clear steps to reproduce your problem
2. If the bug is intermittent, give a rough frequency if possible

##### Observed behaviour
##### Observed behavior
Describe what the player is doing that is unexpected or undesired behaviour.

##### Console output
```
Paste the contents of the browser console here.
You may need to enable debug logging in dash.js by calling player.updateSettings({ 'debug': { 'logLevel': dashjs.Debug.LOG_LEVEL_DEBUG }}) if you are using your own page.
```

##### Expected behavior
Describe what the player is expected to do
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: 12 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 Expand Up @@ -46,6 +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).

## 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
54 changes: 49 additions & 5 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,7 +132,21 @@ declare namespace dashjs {
useAppendWindow?: boolean,
manifestUpdateRetryInterval?: number;
stallThreshold?: number;
liveCatchup: {
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;
playbackRate?: 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,10 +191,11 @@ declare namespace dashjs {
'BitstreamSwitchingSegment'?: number;
'IndexSegment'?: number;
'other'?: number;
'lowLatencyMultiplyFactor'?: number;
};
abr?: {
movingAverageMethod?: 'slidingWindow' | 'ewma';
ABRStrategy?: 'abrDynamic' | 'abrBola';
ABRStrategy?: 'abrDynamic' | 'abrBola' | 'abrL2A' | 'abrLoLP' | 'abrThroughput';
bandwidthSafetyFactor?: number;
useDefaultABRRules?: boolean;
useDeadTimeLatency?: boolean;
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 Expand Up @@ -1088,5 +1130,7 @@ declare namespace dashjs {

export type MetricType = 'ManifestUpdate' | 'RequestsQueue';
export type TrackSwitchMode = 'alwaysReplace' | 'neverReplace';
export type TrackSelectionMode = 'highestBitrate' | 'widestRange';
export type TrackSelectionMode = 'highestBitrate' | 'highestEfficiency' | 'widestRange';
export function supportsMediaSource(): boolean;

}
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import { MediaPlayer } from './index_mediaplayerOnly';

import { supportsMediaSource } from './src/streaming/utils/Capabilities';
import MetricsReporting from './src/streaming/metrics/MetricsReporting';
import Protection from './src/streaming/protection/Protection';
import MediaPlayerFactory from './src/streaming/MediaPlayerFactory';
Expand All @@ -40,6 +41,7 @@ dashjs.Protection = Protection;
dashjs.MetricsReporting = MetricsReporting;
dashjs.MediaPlayerFactory = MediaPlayerFactory;
dashjs.Debug = Debug;
dashjs.supportsMediaSource = supportsMediaSource;

export default dashjs;
export { MediaPlayer, Protection, MetricsReporting, MediaPlayerFactory, Debug};
export { MediaPlayer, Protection, MetricsReporting, MediaPlayerFactory, Debug, supportsMediaSource };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashjs",
"version": "3.2.0",
"version": "3.2.1",
"description": "A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.",
"main": "build/es5/index.js",
"types": "build/typings/index.d.ts",
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/"
}
]
}
Loading

0 comments on commit 07d0a87

Please sign in to comment.